Index: libstdc++-v3/include/std/array =================================================================== --- libstdc++-v3/include/std/array (.../tags/gcc_4_7_0_release) (wersja 185695) +++ libstdc++-v3/include/std/array (.../branches/gcc-4_7-branch) (wersja 185695) @@ -1,6 +1,7 @@ // -*- C++ -*- -// Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +// Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 +// Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -174,8 +175,9 @@ const_reference at(size_type __n) const { - return __n < _Nm ? - _M_instance[__n] : __throw_out_of_range(__N("array::at")); + if (__n >= _Nm) + std::__throw_out_of_range(__N("array::at")); + return _M_instance[__n]; } #endif Index: libstdc++-v3/ChangeLog =================================================================== --- libstdc++-v3/ChangeLog (.../tags/gcc_4_7_0_release) (wersja 185695) +++ libstdc++-v3/ChangeLog (.../branches/gcc-4_7-branch) (wersja 185695) @@ -1,3 +1,8 @@ +2012-03-22 Paolo Carlini + + * include/std/array (array<>::at(size_type) const): Fix version + for undefined __EXCEPTIONS. + 2012-03-22 Release Manager * GCC 4.7.0 released. Index: gcc/DEV-PHASE =================================================================== --- gcc/DEV-PHASE (.../tags/gcc_4_7_0_release) (wersja 185695) +++ gcc/DEV-PHASE (.../branches/gcc-4_7-branch) (wersja 185695) @@ -0,0 +1 @@ +prerelease Index: gcc/ChangeLog =================================================================== --- gcc/ChangeLog (.../tags/gcc_4_7_0_release) (wersja 185695) +++ gcc/ChangeLog (.../branches/gcc-4_7-branch) (wersja 185695) @@ -1,3 +1,28 @@ +2012-03-22 Georg-Johann Lay + + Backport from mainline r185259. + + PR other/52545 + * output.h (SECTION_EXCLUDE, SECTION_MACH_DEP): Don't use + SECTION_MACH_DEP reserved bits for SECTION_EXCLUDE. + +2012-03-22 Jakub Jelinek + + Backported from mainline + 2012-03-13 Jakub Jelinek + + PR c/52577 + * c-parser.c (c_parser_postfix_expression) + : Call mark_exp_read on argument values. + + * config/i386/smmintrin.h: Avoid /* within a comment. + * config/i386/nmmintrin.h: Likewise. + +2012-03-22 Richard Guenther + + * BASE-VER: Set to 4.7.1. + * DEV-PHASE: Set to prerelease. + 2012-03-22 Release Manager * GCC 4.7.0 released. Index: gcc/testsuite/gcc.dg/Wunused-var-3.c =================================================================== --- gcc/testsuite/gcc.dg/Wunused-var-3.c (.../tags/gcc_4_7_0_release) (wersja 0) +++ gcc/testsuite/gcc.dg/Wunused-var-3.c (.../branches/gcc-4_7-branch) (wersja 185695) @@ -0,0 +1,34 @@ +/* PR c/52577 */ +/* { dg-do compile } */ +/* { dg-options "-Wunused" } */ + +typedef int V __attribute__((vector_size (sizeof (int) * 4))); + +void +f1 (V *p) +{ + V mask = { 1, 2, 3, 0 }; + *p = __builtin_shuffle (*p, mask); +} + +void +f2 (V *p, V *q) +{ + V mask = { 1, 2, 3, 0 }; + *p = __builtin_shuffle (*p, *q, mask); +} + +void +f3 (V *p, V *mask) +{ + V a = { 1, 2, 3, 0 }; + *p = __builtin_shuffle (a, *mask); +} + +void +f4 (V *p, V *mask) +{ + V a = { 1, 2, 3, 0 }; + V b = { 2, 3, 4, 1 }; + *p = __builtin_shuffle (a, b, *mask); +} Index: gcc/testsuite/ChangeLog =================================================================== --- gcc/testsuite/ChangeLog (.../tags/gcc_4_7_0_release) (wersja 185695) +++ gcc/testsuite/ChangeLog (.../branches/gcc-4_7-branch) (wersja 185695) @@ -1,3 +1,16 @@ +2012-03-22 Jakub Jelinek + + Backported from mainline + 2012-03-14 Jakub Jelinek + + PR c++/52521 + * g++.dg/cpp0x/udlit-args2.C: New test. + + 2012-03-13 Jakub Jelinek + + PR c/52577 + * gcc.dg/Wunused-var-3.c: New test. + 2012-03-22 Release Manager * GCC 4.7.0 released. Index: gcc/testsuite/g++.dg/cpp0x/udlit-args2.C =================================================================== --- gcc/testsuite/g++.dg/cpp0x/udlit-args2.C (.../tags/gcc_4_7_0_release) (wersja 0) +++ gcc/testsuite/g++.dg/cpp0x/udlit-args2.C (.../branches/gcc-4_7-branch) (wersja 185695) @@ -0,0 +1,15 @@ +// PR c++/52521 +// { dg-do compile } +// { dg-options -std=c++11 } + +#include + +int operator "" _a (const char *); +int operator "" _a (const char *, std::size_t); +int a = 123_a; +int a2 = "abc"_a; + +int operator "" _b (const char *, std::size_t); +int operator "" _b (const char *); +int b = 123_b; +int b2 = "abc"_b; Index: gcc/cp/ChangeLog =================================================================== --- gcc/cp/ChangeLog (.../tags/gcc_4_7_0_release) (wersja 185695) +++ gcc/cp/ChangeLog (.../branches/gcc-4_7-branch) (wersja 185695) @@ -1,3 +1,13 @@ +2012-03-22 Jakub Jelinek + + Backported from mainline + 2012-03-14 Jakub Jelinek + + PR c++/52521 + * parser.c (lookup_literal_operator): Return fn only if + processed all arguments from args vector and argtypes is + void_list_node. + 2012-03-22 Release Manager * GCC 4.7.0 released. Index: gcc/cp/parser.c =================================================================== --- gcc/cp/parser.c (.../tags/gcc_4_7_0_release) (wersja 185695) +++ gcc/cp/parser.c (.../branches/gcc-4_7-branch) (wersja 185695) @@ -1,6 +1,6 @@ /* C++ Parser. Copyright (C) 2000, 2001, 2002, 2003, 2004, - 2005, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. + 2005, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. Written by Mark Mitchell . This file is part of GCC. @@ -3581,7 +3581,13 @@ TREE_TYPE (tparm)))) found = false; } - if (found) + if (found + && ix == VEC_length (tree, args) + /* May be this should be sufficient_parms_p instead, + depending on how exactly should user-defined literals + work in presence of default arguments on the literal + operator parameters. */ + && argtypes == void_list_node) return fn; } } Index: gcc/BASE-VER =================================================================== --- gcc/BASE-VER (.../tags/gcc_4_7_0_release) (wersja 185695) +++ gcc/BASE-VER (.../branches/gcc-4_7-branch) (wersja 185695) @@ -1 +1 @@ -4.7.0 +4.7.1 Index: gcc/output.h =================================================================== --- gcc/output.h (.../tags/gcc_4_7_0_release) (wersja 185695) +++ gcc/output.h (.../branches/gcc-4_7-branch) (wersja 185695) @@ -446,8 +446,8 @@ #define SECTION_STYLE_MASK 0x600000 /* bits used for SECTION_STYLE */ #define SECTION_COMMON 0x800000 /* contains common data */ #define SECTION_RELRO 0x1000000 /* data is readonly after relocation processing */ -#define SECTION_MACH_DEP 0x2000000 /* subsequent bits reserved for target */ -#define SECTION_EXCLUDE 0x4000000 /* discarded by the linker */ +#define SECTION_EXCLUDE 0x2000000 /* discarded by the linker */ +#define SECTION_MACH_DEP 0x4000000 /* subsequent bits reserved for target */ /* This SECTION_STYLE is used for unnamed sections that we can switch to using a special assembler directive. */ Index: gcc/c-parser.c =================================================================== --- gcc/c-parser.c (.../tags/gcc_4_7_0_release) (wersja 185695) +++ gcc/c-parser.c (.../branches/gcc-4_7-branch) (wersja 185695) @@ -1,7 +1,7 @@ /* Parser for C and Objective-C. Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011 - Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011, + 2012 Free Software Foundation, Inc. Parser actions based on the old Bison parser; structure somewhat influenced by and fragments based on the C++ parser. @@ -6647,6 +6647,8 @@ case RID_BUILTIN_SHUFFLE: { VEC(c_expr_t,gc) *cexpr_list; + unsigned int i; + c_expr_t *p; c_parser_consume_token (parser); if (!c_parser_get_builtin_args (parser, @@ -6657,6 +6659,9 @@ break; } + FOR_EACH_VEC_ELT (c_expr_t, cexpr_list, i, p) + mark_exp_read (p->value); + if (VEC_length (c_expr_t, cexpr_list) == 2) expr.value = c_build_vec_perm_expr Index: gcc/config/i386/nmmintrin.h =================================================================== --- gcc/config/i386/nmmintrin.h (.../tags/gcc_4_7_0_release) (wersja 185695) +++ gcc/config/i386/nmmintrin.h (.../branches/gcc-4_7-branch) (wersja 185695) @@ -1,4 +1,4 @@ -/* Copyright (C) 2007, 2009 Free Software Foundation, Inc. +/* Copyright (C) 2007, 2009, 2012 Free Software Foundation, Inc. This file is part of GCC. @@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . + . */ /* Implemented from the specification included in the Intel C++ Compiler User Guide and Reference, version 10.0. */ Index: gcc/config/i386/smmintrin.h =================================================================== --- gcc/config/i386/smmintrin.h (.../tags/gcc_4_7_0_release) (wersja 185695) +++ gcc/config/i386/smmintrin.h (.../branches/gcc-4_7-branch) (wersja 185695) @@ -1,4 +1,4 @@ -/* Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +/* Copyright (C) 2007, 2008, 2009, 2010, 2012 Free Software Foundation, Inc. This file is part of GCC. @@ -19,9 +19,8 @@ You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . + . */ - /* Implemented from the specification included in the Intel C++ Compiler User Guide and Reference, version 10.0. */