diff options
author | Sofiane Naci <sofiane.naci@arm.com> | 2013-03-26 11:05:16 +0000 |
---|---|---|
committer | Sofiane Naci <sofiane.naci@arm.com> | 2013-03-26 11:05:16 +0000 |
commit | 8fcbd55bcb6557358a1c822c54f92345ee0a453d (patch) | |
tree | 151e72ad1b7d7839c3809f7d9af8f7b5a9e8a676 | |
parent | 7bfb354ccf5c19ffd0f0d493f569e81b2d067b69 (diff) |
Merge from gcc-4_7-branch 196668:196702.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/ARM/aarch64-4.7-branch@197099 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 46 | ||||
-rw-r--r-- | gcc/DATESTAMP | 2 | ||||
-rw-r--r-- | gcc/config/arm/arm.c | 106 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 16 | ||||
-rw-r--r-- | gcc/config/i386/i386.h | 6 | ||||
-rw-r--r-- | gcc/cp/ChangeLog | 15 | ||||
-rw-r--r-- | gcc/cp/parser.c | 8 | ||||
-rw-r--r-- | gcc/cp/semantics.c | 10 | ||||
-rw-r--r-- | gcc/doc/cppopts.texi | 2 | ||||
-rw-r--r-- | gcc/doc/generic.texi | 4 | ||||
-rw-r--r-- | gcc/doc/invoke.texi | 14 | ||||
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/trans-intrinsic.c | 5 | ||||
-rw-r--r-- | gcc/godump.c | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this9.C | 19 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/trailing9.C | 12 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr56560.c | 19 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/transfer_intrinsic_5.f90 | 50 | ||||
-rw-r--r-- | libstdc++-v3/ChangeLog | 12 | ||||
-rw-r--r-- | libstdc++-v3/include/std/mutex | 10 | ||||
-rw-r--r-- | libstdc++-v3/libsupc++/exception_ptr.h | 4 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/30_threads/lock_guard/cons/1.cc | 9 |
23 files changed, 308 insertions, 83 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0743138f770..50a8215ce6c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,49 @@ +2013-03-22 H.J. Lu <hongjiu.lu@intel.com> + + PR target/56560 + * config/i386/i386.h (ix86_args): Define only if USED_FOR_TARGET + isn't defined. + +2013-03-22 H.J. Lu <hongjiu.lu@intel.com> + + PR target/56560 + * config/i386/i386.c (init_cumulative_args): Also set + cum->callee_return_avx256_p. + (ix86_function_arg): Set cum->callee_pass_avx256_p. Set + cfun->machine->callee_pass_avx256_p only when MODE == VOIDmode. + + * config/i386/i386.h (ix86_args): Add callee_pass_avx256_p and + callee_return_avx256_p. + +2013-03-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + Backport from mainline: + 2012-12-04 Ian Lance Taylor <iant@google.com> + + * godump.c (find_dummy_types): Output a dummy type if we couldn't + output the real type. + +2013-03-20 Jack Howarth <howarth@bromo.med.uc.edu> + + PR bootstrap/56258 + * doc/generic.texi (POINTER_PLUS_EXPR): Use @item instead of @itemx. + (PLUS_EXPR): Likewise. + * doc/cppopts.texi (--help): Likewise. + * doc/invoke.texi (-fenable-@var{kind}-@var{pass}): Likewise. + (-fdump-rtl-cprop_hardreg): Likewise. + (-fdump-rtl-csa): Likewise. + (-fdump-rtl-dce): Likewise. + (-fdump-rtl-dbr): Likewise. + (-fdump-rtl-into_cfglayout): Likewise. + (-fdump-rtl-outof_cfglayout): Likewise. + +2013-03-18 Richard Earnshaw <rearnsha@arm.com> + + PR target/56470 + * config/arm/arm.c (shift_op): Validate RTL pattern on the fly. + (arm_print_operand, case 'S'): Don't use shift_operator to validate + the RTL. + 2013-03-14 Seth LaForge <sethml@google.com> PR target/56351 diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index e36c70fcf26..6280d60defd 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20130315 +20130325 diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 26ac2caa0fa..1fb7d70108f 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -14873,72 +14873,88 @@ shift_op (rtx op, HOST_WIDE_INT *amountp) const char * mnem; enum rtx_code code = GET_CODE (op); - switch (GET_CODE (XEXP (op, 1))) - { - case REG: - case SUBREG: - *amountp = -1; - break; - - case CONST_INT: - *amountp = INTVAL (XEXP (op, 1)); - break; - - default: - gcc_unreachable (); - } - switch (code) { case ROTATE: - gcc_assert (*amountp != -1); - *amountp = 32 - *amountp; - code = ROTATERT; + if (!CONST_INT_P (XEXP (op, 1))) + { + output_operand_lossage ("invalid shift operand"); + return NULL; + } - /* Fall through. */ + code = ROTATERT; + *amountp = 32 - INTVAL (XEXP (op, 1)); + mnem = "ror"; + break; case ASHIFT: case ASHIFTRT: case LSHIFTRT: case ROTATERT: mnem = arm_shift_nmem(code); + if (CONST_INT_P (XEXP (op, 1))) + { + *amountp = INTVAL (XEXP (op, 1)); + } + else if (REG_P (XEXP (op, 1))) + { + *amountp = -1; + return mnem; + } + else + { + output_operand_lossage ("invalid shift operand"); + return NULL; + } break; case MULT: /* We never have to worry about the amount being other than a power of 2, since this case can never be reloaded from a reg. */ - gcc_assert (*amountp != -1); + if (!CONST_INT_P (XEXP (op, 1))) + { + output_operand_lossage ("invalid shift operand"); + return NULL; + } + + *amountp = INTVAL (XEXP (op, 1)) & 0xFFFFFFFF; + + /* Amount must be a power of two. */ + if (*amountp & (*amountp - 1)) + { + output_operand_lossage ("invalid shift operand"); + return NULL; + } + *amountp = int_log2 (*amountp); return ARM_LSL_NAME; default: - gcc_unreachable (); + output_operand_lossage ("invalid shift operand"); + return NULL; } - if (*amountp != -1) + /* This is not 100% correct, but follows from the desire to merge + multiplication by a power of 2 with the recognizer for a + shift. >=32 is not a valid shift for "lsl", so we must try and + output a shift that produces the correct arithmetical result. + Using lsr #32 is identical except for the fact that the carry bit + is not set correctly if we set the flags; but we never use the + carry bit from such an operation, so we can ignore that. */ + if (code == ROTATERT) + /* Rotate is just modulo 32. */ + *amountp &= 31; + else if (*amountp != (*amountp & 31)) { - /* This is not 100% correct, but follows from the desire to merge - multiplication by a power of 2 with the recognizer for a - shift. >=32 is not a valid shift for "lsl", so we must try and - output a shift that produces the correct arithmetical result. - Using lsr #32 is identical except for the fact that the carry bit - is not set correctly if we set the flags; but we never use the - carry bit from such an operation, so we can ignore that. */ - if (code == ROTATERT) - /* Rotate is just modulo 32. */ - *amountp &= 31; - else if (*amountp != (*amountp & 31)) - { - if (code == ASHIFT) - mnem = "lsr"; - *amountp = 32; - } - - /* Shifts of 0 are no-ops. */ - if (*amountp == 0) - return NULL; + if (code == ASHIFT) + mnem = "lsr"; + *amountp = 32; } + /* Shifts of 0 are no-ops. */ + if (*amountp == 0) + return NULL; + return mnem; } @@ -17313,12 +17329,6 @@ arm_print_operand (FILE *stream, rtx x, int code) HOST_WIDE_INT val; const char *shift; - if (!shift_operator (x, SImode)) - { - output_operand_lossage ("invalid shift operand"); - break; - } - shift = shift_op (x, &val); if (shift) diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index c1f6c880c81..7a441c73237 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -5592,7 +5592,10 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, /* Argument info to initialize */ { /* The return value of this function uses 256bit AVX modes. */ if (caller) - cfun->machine->callee_return_avx256_p = true; + { + cfun->machine->callee_return_avx256_p = true; + cum->callee_return_avx256_p = true; + } else cfun->machine->caller_return_avx256_p = true; } @@ -6863,11 +6866,20 @@ ix86_function_arg (cumulative_args_t cum_v, enum machine_mode omode, { /* This argument uses 256bit AVX modes. */ if (cum->caller) - cfun->machine->callee_pass_avx256_p = true; + cum->callee_pass_avx256_p = true; else cfun->machine->caller_pass_avx256_p = true; } + if (cum->caller && mode == VOIDmode) + { + /* This function is called with MODE == VOIDmode immediately + before the call instruction is emitted. We copy callee 256bit + AVX info from the current CUM here. */ + cfun->machine->callee_return_avx256_p = cum->callee_return_avx256_p; + cfun->machine->callee_pass_avx256_p = cum->callee_pass_avx256_p; + } + return arg; } diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 80d19f1daf2..835ea10d184 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -1474,6 +1474,7 @@ enum reg_class /* 1 if N is a possible register number for function argument passing. */ #define FUNCTION_ARG_REGNO_P(N) ix86_function_arg_regno_p (N) +#ifndef USED_FOR_TARGET /* Define a data type for recording info about an argument list during the scan of that argument list. This data type should hold all necessary information about the function itself @@ -1502,7 +1503,12 @@ typedef struct ix86_args { in SSE registers. Otherwise 0. */ enum calling_abi call_abi; /* Set to SYSV_ABI for sysv abi. Otherwise MS_ABI for ms abi. */ + /* Nonzero if it passes 256bit AVX modes. */ + BOOL_BITFIELD callee_pass_avx256_p : 1; + /* Nonzero if it returns 256bit AVX modes. */ + BOOL_BITFIELD callee_return_avx256_p : 1; } CUMULATIVE_ARGS; +#endif /* Initialize a variable CUM of type CUMULATIVE_ARGS for a call to a function whose data type is FNTYPE. diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index acecb5add44..b22536262b6 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,18 @@ +2013-03-23 Jason Merrill <jason@redhat.com> + + PR c++/54277 + * semantics.c (lambda_capture_field_type): Don't build a + magic decltype for pointer types. + (lambda_proxy_type): Likewise. + (finish_non_static_data_member): Get the quals from + the object. + +2013-03-20 Jason Merrill <jason@redhat.com> + + PR c++/56646 + * parser.c (cp_parser_late_return_type_opt): Save and restore + current_class_ptr/ref. + 2013-03-14 Jason Merrill <jason@redhat.com> PR c++/56614 diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index cdb524e2f03..f875b66ffa4 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -16699,17 +16699,21 @@ cp_parser_late_return_type_opt (cp_parser* parser, cp_cv_quals quals) /* Consume the ->. */ cp_lexer_consume_token (parser->lexer); + tree save_ccp = current_class_ptr; + tree save_ccr = current_class_ref; if (quals >= 0) { /* DR 1207: 'this' is in scope in the trailing return type. */ - gcc_assert (current_class_ptr == NULL_TREE); inject_this_parameter (current_class_type, quals); } type = cp_parser_trailing_type_id (parser); if (quals >= 0) - current_class_ptr = current_class_ref = NULL_TREE; + { + current_class_ptr = save_ccp; + current_class_ref = save_ccr; + } return type; } diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 0ad32a08518..8735c8c799d 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -1570,9 +1570,7 @@ finish_non_static_data_member (tree decl, tree object, tree qualifying_scope) else { /* Set the cv qualifiers. */ - int quals = (current_class_ref - ? cp_type_quals (TREE_TYPE (current_class_ref)) - : TYPE_UNQUALIFIED); + int quals = cp_type_quals (TREE_TYPE (object)); if (DECL_MUTABLE_P (decl)) quals &= ~TYPE_QUAL_CONST; @@ -8815,7 +8813,8 @@ tree lambda_capture_field_type (tree expr) { tree type; - if (type_dependent_expression_p (expr)) + if (type_dependent_expression_p (expr) + && !(TREE_TYPE (expr) && TREE_CODE (TREE_TYPE (expr)) == POINTER_TYPE)) { type = cxx_make_type (DECLTYPE_TYPE); DECLTYPE_TYPE_EXPR (type) = expr; @@ -9020,7 +9019,8 @@ lambda_proxy_type (tree ref) if (REFERENCE_REF_P (ref)) ref = TREE_OPERAND (ref, 0); type = TREE_TYPE (ref); - if (!dependent_type_p (type)) + if (!dependent_type_p (type) + || (type && TREE_CODE (type) == POINTER_TYPE)) return type; type = cxx_make_type (DECLTYPE_TYPE); DECLTYPE_TYPE_EXPR (type) = ref; diff --git a/gcc/doc/cppopts.texi b/gcc/doc/cppopts.texi index 205d8708833..a1b66a29ad4 100644 --- a/gcc/doc/cppopts.texi +++ b/gcc/doc/cppopts.texi @@ -803,7 +803,7 @@ Replacement: [ ] @{ @} # \ ^ | ~ Enable special code to work around file systems which only permit very short file names, such as MS-DOS@. -@itemx --help +@item --help @itemx --target-help @opindex help @opindex target-help diff --git a/gcc/doc/generic.texi b/gcc/doc/generic.texi index 31e8855bf84..261ea236ed2 100644 --- a/gcc/doc/generic.texi +++ b/gcc/doc/generic.texi @@ -1415,13 +1415,13 @@ generate these expressions anyhow, if it can tell that strictness does not matter. The type of the operands and that of the result are always of @code{BOOLEAN_TYPE} or @code{INTEGER_TYPE}. -@itemx POINTER_PLUS_EXPR +@item POINTER_PLUS_EXPR This node represents pointer arithmetic. The first operand is always a pointer/reference type. The second operand is always an unsigned integer type compatible with sizetype. This is the only binary arithmetic operand that can operate on pointer types. -@itemx PLUS_EXPR +@item PLUS_EXPR @itemx MINUS_EXPR @itemx MULT_EXPR These nodes represent various binary arithmetic operations. diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 08b464b8859..e23d9feb1b0 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -5188,7 +5188,7 @@ thus dbg_cnt() returns true always unless the upper bound is set by this option. e.g. With -fdbg-cnt=dce:10,tail_call:0 dbg_cnt(dce) will return true only for first 10 invocations -@itemx -fenable-@var{kind}-@var{pass} +@item -fenable-@var{kind}-@var{pass} @itemx -fdisable-@var{kind}-@var{pass}=@var{range-list} @opindex fdisable- @opindex fenable- @@ -5336,11 +5336,11 @@ Dump after duplicating the computed gotos. @option{-fdump-rtl-ce3} enable dumping after the three if conversion passes. -@itemx -fdump-rtl-cprop_hardreg +@item -fdump-rtl-cprop_hardreg @opindex fdump-rtl-cprop_hardreg Dump after hard register copy propagation. -@itemx -fdump-rtl-csa +@item -fdump-rtl-csa @opindex fdump-rtl-csa Dump after combining stack adjustments. @@ -5351,11 +5351,11 @@ Dump after combining stack adjustments. @option{-fdump-rtl-cse1} and @option{-fdump-rtl-cse2} enable dumping after the two common sub-expression elimination passes. -@itemx -fdump-rtl-dce +@item -fdump-rtl-dce @opindex fdump-rtl-dce Dump after the standalone dead code elimination passes. -@itemx -fdump-rtl-dbr +@item -fdump-rtl-dbr @opindex fdump-rtl-dbr Dump after delayed branch scheduling. @@ -5400,7 +5400,7 @@ Dump after the initialization of the registers. @opindex fdump-rtl-initvals Dump after the computation of the initial value sets. -@itemx -fdump-rtl-into_cfglayout +@item -fdump-rtl-into_cfglayout @opindex fdump-rtl-into_cfglayout Dump after converting to cfglayout mode. @@ -5430,7 +5430,7 @@ Dump after removing redundant mode switches. @opindex fdump-rtl-rnreg Dump after register renumbering. -@itemx -fdump-rtl-outof_cfglayout +@item -fdump-rtl-outof_cfglayout @opindex fdump-rtl-outof_cfglayout Dump after converting from cfglayout mode. diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 6ffba521238..88377f547c5 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2013-03-15 Tobias Burnus <burnus@net-b.de> + + PR fortran/56615 + * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Pack arrays + if they are not simply contiguous. + 2013-03-13 Paul Thomas <pault@gcc.gnu.org> PR fortran/56575 diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c index b351824b6d3..ed0ab8b2ed9 100644 --- a/gcc/fortran/trans-intrinsic.c +++ b/gcc/fortran/trans-intrinsic.c @@ -5412,9 +5412,8 @@ gfc_conv_intrinsic_transfer (gfc_se * se, gfc_expr * expr) source = gfc_conv_descriptor_data_get (argse.expr); source_type = gfc_get_element_type (TREE_TYPE (argse.expr)); - /* Repack the source if not a full variable array. */ - if (arg->expr->expr_type == EXPR_VARIABLE - && arg->expr->ref->u.ar.type != AR_FULL) + /* Repack the source if not simply contiguous. */ + if (!gfc_is_simply_contiguous (arg->expr, false)) { tmp = gfc_build_addr_expr (NULL_TREE, argse.expr); diff --git a/gcc/godump.c b/gcc/godump.c index ab1edc620f9..b5455253b61 100644 --- a/gcc/godump.c +++ b/gcc/godump.c @@ -1,5 +1,5 @@ /* Output Go language descriptions of types. - Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc. + Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. Written by Ian Lance Taylor <iant@google.com>. This file is part of GCC. @@ -1164,9 +1164,11 @@ find_dummy_types (const void *ptr, void *adata) struct godump_container *data = (struct godump_container *) adata; const char *type = (const char *) ptr; void **slot; + void **islot; slot = htab_find_slot (data->type_hash, type, NO_INSERT); - if (slot == NULL) + islot = htab_find_slot (data->invalid_hash, type, NO_INSERT); + if (slot == NULL || islot != NULL) fprintf (go_dump_file, "type _%s struct {}\n", type); return true; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1d3f9606719..eae340a83df 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2013-03-22 H.J. Lu <hongjiu.lu@intel.com> + + PR target/56560 + * gcc.target/i386/pr56560.c: New file. + +2013-03-15 Tobias Burnus <burnus@net-b.de> + + PR fortran/56615 + * gfortran.dg/transfer_intrinsic_5.f90: New. + 2013-03-14 Jakub Jelinek <jakub@redhat.com> PR c++/56403 diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this9.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this9.C new file mode 100644 index 00000000000..07ddd0863de --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this9.C @@ -0,0 +1,19 @@ +// PR c++/54277 +// { dg-do compile { target c++11 } } + +struct Used +{ + void foo() { } +}; + +template <typename> +struct S +{ + Used x; + + void bar() + { + auto f = [this] { x.foo(); }; + f(); + } +}; diff --git a/gcc/testsuite/g++.dg/cpp0x/trailing9.C b/gcc/testsuite/g++.dg/cpp0x/trailing9.C new file mode 100644 index 00000000000..d7895b38e3e --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/trailing9.C @@ -0,0 +1,12 @@ +// PR c++/56646 +// { dg-require-effective-target c++11 } + +struct A { + void f(); +}; + +void A::f() { + struct B { + auto g() -> void { } + }; +} diff --git a/gcc/testsuite/gcc.target/i386/pr56560.c b/gcc/testsuite/gcc.target/i386/pr56560.c new file mode 100644 index 00000000000..5417cbddedb --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr56560.c @@ -0,0 +1,19 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mavx -mvzeroupper -dp" } */ + +extern void abort (void); + +typedef double vec_t __attribute__((vector_size(32))); + +struct S { int i1; int i2; int i3; }; + +extern int bar (vec_t, int, int, int, int, int, struct S); + +void foo (vec_t v, struct S s) +{ + int i = bar (v, 1, 2, 3, 4, 5, s); + if (i == 0) + abort (); +} + +/* { dg-final { scan-assembler-not "avx_vzeroupper" } } */ diff --git a/gcc/testsuite/gfortran.dg/transfer_intrinsic_5.f90 b/gcc/testsuite/gfortran.dg/transfer_intrinsic_5.f90 new file mode 100644 index 00000000000..47be585a78a --- /dev/null +++ b/gcc/testsuite/gfortran.dg/transfer_intrinsic_5.f90 @@ -0,0 +1,50 @@ +! { dg-do run } +! +! PR fortran/56615 +! +! Contributed by Harald Anlauf +! +! +program gfcbug + implicit none + integer, parameter :: n = 8 + integer :: i + character(len=1), dimension(n) :: a, b + character(len=n) :: s, t + character(len=n/2) :: u + + do i = 1, n + a(i) = achar (i-1 + iachar("a")) + end do +! print *, "# Forward:" +! print *, "a=", a + s = transfer (a, s) +! print *, "s=", s + call cmp (a, s) +! print *, " stride = +2:" + do i = 1, n/2 + u(i:i) = a(2*i-1) + end do +! print *, "u=", u + call cmp (a(1:n:2), u) +! print * +! print *, "# Backward:" + b = a(n:1:-1) +! print *, "b=", b + t = transfer (b, t) +! print *, "t=", t + call cmp (b, t) +! print *, " stride = -1:" + call cmp (a(n:1:-1), t) +contains + subroutine cmp (b, s) + character(len=1), dimension(:), intent(in) :: b + character(len=*), intent(in) :: s + character(len=size(b)) :: c + c = transfer (b, c) + if (c /= s) then + print *, "c=", c, " ", merge (" ok","BUG!", c == s) + call abort () + end if + end subroutine cmp +end program gfcbug diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 133dbc9c83f..282f3204d18 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,15 @@ +2013-03-16 Jonathan Wakely <jwakely.gcc@gmail.com> + + PR libstdc++/56468 + * libsupc++/exception_ptr.h (type_info): Declare. + +2013-03-16 Jonathan Wakely <jwakely.gcc@gmail.com> + + PR libstdc++/56002 + * include/std/mutex (lock_guard, unique_lock, lock): Define without + depending on _GLIBCXX_HAS_GTHREADS. + * testsuite/30_threads/lock_guard/cons/1.cc: Run on all targets. + 2013-03-09 François Dumont <fdumont@gcc.gnu.org> * include/bits/vector.tcc (vector<>operator=(const vector<>&): diff --git a/libstdc++-v3/include/std/mutex b/libstdc++-v3/include/std/mutex index 34d64c5b65f..fc9691971c6 100644 --- a/libstdc++-v3/include/std/mutex +++ b/libstdc++-v3/include/std/mutex @@ -1,6 +1,6 @@ // <mutex> -*- C++ -*- -// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 +// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -46,12 +46,13 @@ #include <bits/gthr.h> #include <bits/move.h> // for std::swap -#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) +#ifdef _GLIBCXX_USE_C99_STDINT_TR1 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION +#ifdef _GLIBCXX_HAS_GTHREADS // Common base class for std::mutex and std::timed_mutex class __mutex_base { @@ -420,6 +421,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } }; #endif +#endif // _GLIBCXX_HAS_GTHREADS /// Do not acquire ownership of the mutex. struct defer_lock_t { }; @@ -755,6 +757,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } } +#ifdef _GLIBCXX_HAS_GTHREADS /// once_flag struct once_flag { @@ -826,12 +829,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION if (__e) __throw_system_error(__e); } +#endif // _GLIBCXX_HAS_GTHREADS // @} group mutexes _GLIBCXX_END_NAMESPACE_VERSION } // namespace -#endif // _GLIBCXX_HAS_GTHREADS && _GLIBCXX_USE_C99_STDINT_TR1 +#endif // _GLIBCXX_USE_C99_STDINT_TR1 #endif // __GXX_EXPERIMENTAL_CXX0X__ diff --git a/libstdc++-v3/libsupc++/exception_ptr.h b/libstdc++-v3/libsupc++/exception_ptr.h index b6fd08e09a8..d9f8cc44a57 100644 --- a/libstdc++-v3/libsupc++/exception_ptr.h +++ b/libstdc++-v3/libsupc++/exception_ptr.h @@ -44,6 +44,8 @@ extern "C++" { namespace std { + class type_info; + /** * @addtogroup exceptions * @{ @@ -141,7 +143,7 @@ namespace std operator==(const exception_ptr&, const exception_ptr&) _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__)); - const class type_info* + const class std::type_info* __cxa_exception_type() const _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__)); }; diff --git a/libstdc++-v3/testsuite/30_threads/lock_guard/cons/1.cc b/libstdc++-v3/testsuite/30_threads/lock_guard/cons/1.cc index c135e28e48b..470fc4c49c4 100644 --- a/libstdc++-v3/testsuite/30_threads/lock_guard/cons/1.cc +++ b/libstdc++-v3/testsuite/30_threads/lock_guard/cons/1.cc @@ -1,11 +1,8 @@ -// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* } } -// { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } -// { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } +// { dg-do run } +// { dg-options " -std=gnu++11 " } // { dg-require-cstdint "" } -// { dg-require-gthreads "" } -// Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc. +// Copyright (C) 2010, 2011, 2012, 2013 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 |