[Bug target/63815] g++.dg/other/pr53811.C fails with -mcmodel=large -fpic

2014-11-12 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63815

--- Comment #8 from Uroš Bizjak ubizjak at gmail dot com ---
(In reply to H.J. Lu from comment #7)
 Created attachment 33942 [details]
 A patch

Please also add a testcase that will exercise this functionality.

[Bug target/63815] g++.dg/other/pr53811.C fails with -mcmodel=large -fpic

2014-11-12 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63815

--- Comment #9 from Uroš Bizjak ubizjak at gmail dot com ---
(In reply to Uroš Bizjak from comment #8)
 (In reply to H.J. Lu from comment #7)
  Created attachment 33942 [details]
  A patch
 
 Please also add a testcase that will exercise this functionality.

... runtime testcase ...

[Bug preprocessor/63831] New: [5 Regression] r217292 causes segfauls with -MM

2014-11-12 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63831

Bug ID: 63831
   Summary: [5 Regression] r217292 causes segfauls with -MM
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: preprocessor
  Assignee: unassigned at gcc dot gnu.org
  Reporter: trippels at gcc dot gnu.org

Starting with r217292 I get:

trippels@gcc1-power7 test % cat test.cpp
#include 1.h

trippels@gcc1-power7 test % cat 1.h
#ifndef __has_attribute
#define __has_attribute(x) 0
#endif

#if  __has_attribute(alloc_size)
#   define U_ALLOC_SIZE_ATTR(X) __attribute__ ((alloc_size(X)))
#endif

trippels@gcc1-power7 test % g++ -I ./ -MM test.cpp
built-in: internal compiler error: Segmentation fault
0x109b658b crash_signal
../../gcc/gcc/toplev.c:358
0x110b3a90 parse_has_attribute
../../gcc/libcpp/expr.c:2165
0x110b3a90 eval_token
../../gcc/libcpp/expr.c:1059
0x110b3a90 _cpp_parse_expr
../../gcc/libcpp/expr.c:1227
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See http://gcc.gnu.org/bugs.html for instructions.


[Bug target/58692] aarch64 arm_neon.h functions are not documented

2014-11-12 Thread belagod at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58692

--- Comment #2 from Tejas Belagod belagod at gcc dot gnu.org ---
Committed fix r217405 and r217406.


r217406 | belagod | 2014-11-12 08:46:05 + (Wed, 12 Nov 2014) | 14 lines

[AArch64] Remove unnecessary files.

2014-11-12  Tejas Belagod  tejas.bela...@arm.com

* Makefile.in (TEXI_GCC_FILES): Remove arm-acle-intrinsics.texi,
arm-neon-intrinsics.texi, aarch64-acle-intrinsics.texi.
* doc/aarch64-acle-intrinsics.texi: Remove.
* doc/arm-acle-intrinsics.texi: Remove.
* doc/arm-neon-intrinsics.texi: Remove.
* doc/extend.texi: Consolidate sections AArch64 intrinsics,
ARM NEON Intrinsics, ARM ACLE Intrinsics into one ARM C Language
Extension section. Add references to public ACLE specification.



r217405 | belagod | 2014-11-12 08:42:41 + (Wed, 12 Nov 2014) | 14 lines

[AArch64] Add reference to ACLE and consolidate documentation.

2014-11-12  Tejas Belagod  tejas.bela...@arm.com

* Makefile.in (TEXI_GCC_FILES): Remove arm-acle-intrinsics.texi,
arm-neon-intrinsics.texi, aarch64-acle-intrinsics.texi.
* doc/aarch64-acle-intrinsics.texi: Remove.
* doc/arm-acle-intrinsics.texi: Remove.
* doc/arm-neon-intrinsics.texi: Remove.
* doc/extend.texi: Consolidate sections AArch64 intrinsics,
ARM NEON Intrinsics, ARM ACLE Intrinsics into one ARM C Language
Extension section. Add references to public ACLE specification.


[Bug target/58692] aarch64 arm_neon.h functions are not documented

2014-11-12 Thread belagod at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58692

Tejas Belagod belagod at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Tejas Belagod belagod at gcc dot gnu.org ---
Fixed on trunk r217405 and r217406.


[Bug c++/58972] Lambda can't access private members

2014-11-12 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58972

Ville Voutilainen ville.voutilainen at gmail dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-11-12
 CC||jason at redhat dot com
 Ever confirmed|0   |1

--- Comment #8 from Ville Voutilainen ville.voutilainen at gmail dot com ---
Does not ICE anymore, and the original bug has been resolved (Daniel's local
class example is still rejected). I don't know which revision fixes it, though.
:)


[Bug c++/58972] Lambda can't access private members

2014-11-12 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58972

--- Comment #9 from Ville Voutilainen ville.voutilainen at gmail dot com ---
(In reply to Ville Voutilainen from comment #8)
 Does not ICE anymore, and the original bug has been resolved (Daniel's local
 class example is still rejected). I don't know which revision fixes it,
 though. :)

Clarification - the original aka the lambda case is fixed by the fix for 59483,
the local class example is a separate bug.


[Bug middle-end/63819] [5 Regression]: Cannot build compiler with --enable-gather-detailed-mem-stats (error: default argument given for parameter 5 of ‘void* ggc_internal_cleared_alloc)

2014-11-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63819

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2014-11-12
   Target Milestone|--- |5.0
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener rguenth at gcc dot gnu.org ---
I have a patch.


[Bug c++/63820] [5.0 regression] c++ ICE since libcpp change r217202

2014-11-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63820

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|--- |5.0


[Bug rtl-optimization/63823] [5.0 Regression] MIPS will not build due to LRA ICE with 64 bit ABI

2014-11-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63823

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|--- |5.0


[Bug bootstrap/63821] [5 Regression] ICE in verify_gimple during libgcc build starting with r217349

2014-11-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63821

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
   Target Milestone|--- |5.0
Summary|ICE in verify_gimple during |[5 Regression] ICE in
   |libgcc build starting with  |verify_gimple during libgcc
   |r217349 |build starting with r217349

--- Comment #7 from Richard Biener rguenth at gcc dot gnu.org ---
I will have a look.


[Bug middle-end/63761] [5 Regression] error: gimple_bb (stmt) is set to a wrong basic block

2014-11-12 Thread thopre01 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63761

--- Comment #5 from thopre01 at gcc dot gnu.org ---
Author: thopre01
Date: Wed Nov 12 09:50:20 2014
New Revision: 217409

URL: https://gcc.gnu.org/viewcvs?rev=217409root=gccview=rev
Log:
2014-11-12  Thomas Preud'homme  thomas.preudho...@arm.com

gcc/
PR tree-optimization/63761
* tree-ssa-math-opts.c (bswap_replace): Construct gsi from cur_stmt
rather than taking it as a parameter. Add some comments to explain the
gsi_move_before in case of load and why canonicalization of bswap into
a rotation is only done for 16bit values.
(pass_optimize_bswap::execute): Adapt for loop via gsi to make gsi
refer to the statement just before cur_stmt. Ignore 16bit bswap that
are already in canonical form. Adapt bswap_replace to removal of its
gsi parameter.

2014-11-12  Thomas Preud'homme  thomas.preudho...@arm.com

gcc/testsuite/
PR tree-optimization/63761
* gcc.c-torture/compile/pr63761.c: New test.

Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr63761.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-math-opts.c


[Bug target/63815] [5 Regression] g++.dg/other/pr53811.C fails with -mcmodel=large -fpic

2014-11-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63815

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|--- |5.0
Summary|g++.dg/other/pr53811.C  |[5 Regression]
   |fails with -mcmodel=large   |g++.dg/other/pr53811.C
   |-fpic   |fails with -mcmodel=large
   ||-fpic


[Bug bootstrap/63827] parallel make in libjava broken at r217383

2014-11-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63827

--- Comment #3 from Richard Biener rguenth at gcc dot gnu.org ---
I've also seen parallel bootstrap break once last week.  Of course hard to
track...


[Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM

2014-11-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63831

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P1
   Target Milestone|--- |5.0


[Bug middle-end/63819] [5 Regression]: Cannot build compiler with --enable-gather-detailed-mem-stats (error: default argument given for parameter 5 of ‘void* ggc_internal_cleared_alloc)

2014-11-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63819

--- Comment #2 from Richard Biener rguenth at gcc dot gnu.org ---
Author: rguenth
Date: Wed Nov 12 10:12:47 2014
New Revision: 217410

URL: https://gcc.gnu.org/viewcvs?rev=217410root=gccview=rev
Log:
2014-11-12  Richard Biener  rguent...@suse.de

PR bootstrap/63819
* hash-table.h: Include ggc.h also for generator programs.
* genmatch.c (ggc_internal_cleared_alloc): Properly define
using MEM_STAT_DECL instead of CXX_MEM_STAT_INFO.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/genmatch.c
trunk/gcc/hash-table.h


[Bug bootstrap/63821] [5 Regression] ICE in verify_gimple during libgcc build starting with r217349

2014-11-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63821

--- Comment #8 from Richard Biener rguenth at gcc dot gnu.org ---
Author: rguenth
Date: Wed Nov 12 10:13:48 2014
New Revision: 217411

URL: https://gcc.gnu.org/viewcvs?rev=217411root=gccview=rev
Log:
2014-11-12  Richard Biener  rguent...@suse.de

PR middle-end/63821
* match.pd: Add missing conversion to the -(T)-X pattern.

* gfortran.dg/pr63821.f90: New testcase.

Added:
trunk/gcc/testsuite/gfortran.dg/pr63821.f90
Modified:
trunk/gcc/ChangeLog
trunk/gcc/match.pd
trunk/gcc/testsuite/ChangeLog


[Bug middle-end/63819] [5 Regression]: Cannot build compiler with --enable-gather-detailed-mem-stats (error: default argument given for parameter 5 of ‘void* ggc_internal_cleared_alloc)

2014-11-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63819

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Richard Biener rguenth at gcc dot gnu.org ---
Fixed.


[Bug bootstrap/63821] [5 Regression] ICE in verify_gimple during libgcc build starting with r217349

2014-11-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63821

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #9 from Richard Biener rguenth at gcc dot gnu.org ---
Fixed.


[Bug c++/63820] [5.0 regression] c++ ICE since libcpp change r217202

2014-11-12 Thread jiwang at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63820

Jiong Wang jiwang at gcc dot gnu.org changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Jiong Wang jiwang at gcc dot gnu.org ---
confirmed the ICE gone away on lastest code


[Bug tree-optimization/63817] ICE in verify_gimple_in_cfg tree-cfg.c:5039 (arm)

2014-11-12 Thread jbg...@lug-owl.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63817

--- Comment #4 from Jan-Benedict Glaw jbg...@lug-owl.de ---
You can see this bug live in action for about every target when building a
native toolchain on gcc112, which is done in preparation for a cross-build with
config_list.mk by the build robot:
http://toolchain.lug-owl.de/buildbot/timeline.php


[Bug c++/33911] attribute deprecated vs. templates

2014-11-12 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33911

--- Comment #15 from Jonathan Wakely redi at gcc dot gnu.org ---
Author: redi
Date: Wed Nov 12 10:32:17 2014
New Revision: 217412

URL: https://gcc.gnu.org/viewcvs?rev=217412root=gccview=rev
Log:
Add -Wno-deprecated to dg-options.

PR c++/33911
* testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Use -Wno-deprecated.
* testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise.
* testsuite/20_util/unique_ptr/cons/auto_ptr.cc: Likewise.
* testsuite/20_util/unique_ptr/cons/auto_ptr_neg.cc: Likewise.
* testsuite/ext/array_allocator/variadic_construct.cc: Likewise.

Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr.cc
trunk/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc
trunk/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc
trunk/libstdc++-v3/testsuite/20_util/shared_ptr/cons/auto_ptr.cc
trunk/libstdc++-v3/testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc
trunk/libstdc++-v3/testsuite/20_util/unique_ptr/cons/auto_ptr.cc
trunk/libstdc++-v3/testsuite/20_util/unique_ptr/cons/auto_ptr_neg.cc
trunk/libstdc++-v3/testsuite/ext/array_allocator/variadic_construct.cc


[Bug c++/60420] [C++11] Bogus error: ‘const’ qualifiers cannot be applied to ‘int’ with lambda

2014-11-12 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60420

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 CC||paolo.carlini at oracle dot com

--- Comment #2 from Paolo Carlini paolo.carlini at oracle dot com ---
I'm looking into this, and I don't see how we can accept this kind of code
given 8.3.2: Cv-qualified references are ill-formed except when the
cv-qualifiers are introduced through the use of a typedef (7.1.3) or of a
template type argument (14.3), in which case the cv-qualifiers are ignored..

Daniel, are you willing to comment?


[Bug c++/60420] [C++11] Bogus error: ‘const’ qualifiers cannot be applied to ‘int’ with lambda

2014-11-12 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60420

--- Comment #3 from Paolo Carlini paolo.carlini at oracle dot com ---
... unless the or of a template type argument part applies (but clang accepts
both the original testcase and my Comment #1?!?)


[Bug c++/60420] [C++11] Bogus error: ‘const’ qualifiers cannot be applied to ‘int’ with lambda

2014-11-12 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60420

--- Comment #4 from Paolo Carlini paolo.carlini at oracle dot com ---
In case a correct reduced reproducer would be:

struct MyIter
{
  int operator*();
};

templatetypename Iterator
void foo(Iterator begin)
{
  auto x = [](const decltype(*begin)) { };
}

template void fooMyIter(MyIter);


[Bug c++/60420] [C++11] Bogus error: ‘const’ qualifiers cannot be applied to ‘int’ with lambda

2014-11-12 Thread daniel.kruegler at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60420

--- Comment #5 from Daniel Krügler daniel.kruegler at googlemail dot com ---
(In reply to Paolo Carlini from comment #2)
 I'm looking into this, and I don't see how we can accept this kind of code
 given 8.3.2: Cv-qualified references are ill-formed except when the
 cv-qualifiers are introduced through the use of a typedef (7.1.3) or of a
 template type argument (14.3), in which case the cv-qualifiers are ignored..
 
 Daniel, are you willing to comment?

The current wording is:

Cv-qualified references are ill-formed except when the cv-qualifiers are
introduced through the use of a typedef-name (7.1.3, 14.1) or
decltype-specifier (7.1.6.2), in which case the cv-qualifiers are ignored.

Note that this change came in via CWG 1510 addressing CD3:

http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1510

[Bug c++/60420] [C++11] Bogus error: ‘const’ qualifiers cannot be applied to ‘int’ with lambda

2014-11-12 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60420

--- Comment #6 from Paolo Carlini paolo.carlini at oracle dot com ---
Ah, thanks, that explains everything!


[Bug bootstrap/63827] parallel make in libjava broken at r217383

2014-11-12 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63827

--- Comment #4 from Manuel López-Ibáñez manu at gcc dot gnu.org ---
I haven't tried to reproduce this yet, but I don't see how that patch could
lead to this. What is actually the error that triggers that failure in make?

[Bug c/59708] clang-compatible checked arithmetic builtins

2014-11-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59708

--- Comment #15 from Jakub Jelinek jakub at gcc dot gnu.org ---
Author: jakub
Date: Wed Nov 12 12:28:06 2014
New Revision: 217415

URL: https://gcc.gnu.org/viewcvs?rev=217415root=gccview=rev
Log:
PR c/59708
* builtin-attrs.def (ATTR_NOTHROW_TYPEGENERIC_LEAF): New attribute.
* builtins.c (fold_builtin_arith_overflow): New function.
(fold_builtin_3): Use it.
* builtins.def (BUILT_IN_ADD_OVERFLOW, BUILT_IN_SUB_OVERFLOW,
BUILT_IN_MUL_OVERFLOW, BUILT_IN_SADD_OVERFLOW, BUILT_IN_SADDL_OVERFLOW,
BUILT_IN_SADDLL_OVERFLOW, BUILT_IN_SSUB_OVERFLOW,
BUILT_IN_SSUBL_OVERFLOW, BUILT_IN_SSUBLL_OVERFLOW,
BUILT_IN_SMUL_OVERFLOW, BUILT_IN_SMULL_OVERFLOW,
BUILT_IN_SMULLL_OVERFLOW, BUILT_IN_UADDL_OVERFLOW,
BUILT_IN_UADDLL_OVERFLOW, BUILT_IN_USUB_OVERFLOW,
BUILT_IN_USUBL_OVERFLOW, BUILT_IN_USUBLL_OVERFLOW,
BUILT_IN_UMUL_OVERFLOW, BUILT_IN_UMULL_OVERFLOW,
BUILT_IN_UMULLL_OVERFLOW): New built-in functions.
* builtin-types.def (BT_PTR_UINT, BT_PTR_ULONG, BT_PTR_LONGLONG,
BT_FN_BOOL_INT_INT_INTPTR, BT_FN_BOOL_LONG_LONG_LONGPTR,
BT_FN_BOOL_LONGLONG_LONGLONG_LONGLONGPTR, BT_FN_BOOL_UINT_UINT_UINTPTR,
BT_FN_BOOL_ULONG_ULONG_ULONGPTR,
BT_FN_BOOL_ULONGLONG_ULONGLONG_ULONGLONGPTR, BT_FN_BOOL_VAR): New.
* expr.c (write_complex_part): Remove prototype, no longer static.
* expr.h (write_complex_part): New prototype.
* function.c (aggregate_value_p): For internal functions return 0.
* gimple-fold.c (arith_overflowed_p): New functions.
(gimple_fold_call): Fold {ADD,SUB,MUL}_OVERFLOW internal calls.
* gimple-fold.h (arith_overflowed_p): New prototype.
* tree-ssa-dce.c: Include tree-ssa-propagate.h and gimple-fold.h.
(find_non_realpart_uses, maybe_optimize_arith_overflow): New
functions.
(eliminate_unnecessary_stmts): Transform {ADD,SUB,MUL}_OVERFLOW
into COMPLEX_CST/COMPLEX_EXPR if IMAGPART_EXPR of the result is
never used.
* gimplify.c (gimplify_call_expr): Handle gimplification of
internal calls with lhs.
* internal-fn.c (get_range_pos_neg, get_min_precision,
expand_arith_overflow_result_store): New functions.
(ubsan_expand_si_overflow_addsub_check): Renamed to ...
(expand_addsub_overflow): ... this.  Add LOC, LHS, ARG0, ARG1,
UNSR_P, UNS0_P, UNS1_P, IS_UBSAN arguments, remove STMT argument.
Handle ADD_OVERFLOW and SUB_OVERFLOW expansion.
(ubsan_expand_si_overflow_neg_check): Renamed to ...
(expand_neg_overflow): ... this.  Add LOC, LHS, ARG1, IS_UBSAN
arguments, remove STMT argument.  Handle SUB_OVERFLOW with
0 as first argument expansion.
(ubsan_expand_si_overflow_mul_check): Renamed to ...
(expand_mul_overflow): ... this.  Add LOC, LHS, ARG0, ARG1,
UNSR_P, UNS0_P, UNS1_P, IS_UBSAN arguments, remove STMT argument.
Handle MUL_OVERFLOW expansion.
(expand_UBSAN_CHECK_ADD): Use expand_addsub_overflow, prepare
arguments for it.
(expand_UBSAN_CHECK_SUB): Use expand_addsub_overflow or
expand_neg_overflow, prepare arguments for it.
(expand_UBSAN_CHECK_MUL): Use expand_mul_overflow, prepare arguments
for it.
(expand_arith_overflow, expand_ADD_OVERFLOW, expand_SUB_OVERFLOW,
expand_MUL_OVERFLOW): New functions.
* internal-fn.def (ADD_OVERFLOW, SUB_OVERFLOW, MUL_OVERFLOW): New
internal functions.
* tree-vrp.c (check_for_binary_op_overflow): New function.
(extract_range_basic): Handle {REAL,IMAG}PART_EXPR if the operand
is SSA_NAME set by {ADD,SUB,MUL}_OVERFLOW internal functions.
(simplify_internal_call_using_ranges): Handle {ADD,SUB,MUL}_OVERFLOW
internal functions.
* optabs.def (umulv4_optab): New optab.
* config/i386/i386.md (umulvmode4, umulvqi4): New define_expands.
(*umulvmode4, *umulvqi4): New define_insns.
* doc/extend.texi (Integer Overflow Builtins): Document
__builtin_*_overflow.
c-family/
* c-common.c (check_builtin_function_arguments): Handle
BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
testsuite/
* c-c++-common/builtin-arith-overflow-1.c: New test.
* c-c++-common/torture/builtin-arith-overflow-10.c: New test.
* c-c++-common/torture/builtin-arith-overflow-11.c: New test.
* c-c++-common/torture/builtin-arith-overflow-12.c: New test.
* c-c++-common/torture/builtin-arith-overflow-12.h: New file.
* c-c++-common/torture/builtin-arith-overflow-13.c: New test.
* c-c++-common/torture/builtin-arith-overflow-14.c: New test.
* c-c++-common/torture/builtin-arith-overflow-15.c: New test.
* c-c++-common/torture/builtin-arith-overflow-16.c: New test.
* c-c++-common/torture/builtin-arith-overflow-17.c: New test.
* c-c++-common/torture/builtin-arith-overflow-18.c: New test.
* c-c++-common/torture/builtin-arith-overflow-1.c: New test.
* c-c++-common/torture/builtin-arith-overflow-1.h: New file.
* c-c++-common/torture/builtin-arith-overflow-2.c: New test.
* 

[Bug bootstrap/63827] parallel make in libjava broken at r217383

2014-11-12 Thread howarth at bromo dot med.uc.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63827

--- Comment #5 from howarth at bromo dot med.uc.edu ---
This is extremely reproducible at r217383 on darwin and no other breakage in
the parallel make has been seen this week prior to this commit. The accumulated
error messages in the failing build are...

make[3]: *** read jobs pipe: No such file or directory.  Stop.
make[3]: *** Waiting for unfinished jobs
...
ake[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
'/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/x86_64-apple-darwin13.4.0/libjava'
Makefile:17122: recipe for target 'all-target-libjava' failed
make[1]: *** [all-target-libjava] Error 2
make[1]: Leaving directory '/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir'
Makefile:20722: recipe for target 'bootstrap' failed
make: *** [bootstrap] Error 2
make: INTERNAL: Exiting with 1 jobserver tokens available; should be 16!

It looks like the failure occurs when the java classes are being compiled. Can
we revert r217383 until the flaw in its handling of the parallel make is
resolved? Having to build gcc serially is very painful.


[Bug bootstrap/63827] parallel make in libjava broken at r217383

2014-11-12 Thread howarth at bromo dot med.uc.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63827

--- Comment #6 from howarth at bromo dot med.uc.edu ---
(In reply to Manuel López-Ibáñez from comment #4)
 I haven't tried to reproduce this yet, but I don't see how that patch could
 lead to this. What is actually the error that triggers that failure in make?

The only trigger I see is r217383 and 'make -j 16 bootstrap'. I have been
building darwin bootstraps about 10 times a day for the past week and this
failure never appeared prior to r217383. I do have GNU make 4.1 installed on
this machine. I'll remove that in favor of the darwin system GNU make 3.81 and
see if that suppresses the failure.

[Bug ipa/63814] g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14

2014-11-12 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

--- Comment #4 from Martin Jambor jamborm at gcc dot gnu.org ---
Dominique, if you could pinpoint exactly the revision causing this, it
would be great.  Most of us do not have access to a darwin machine.
Thanks.


[Bug bootstrap/63827] parallel make in libjava broken at r217383

2014-11-12 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63827

--- Comment #7 from Manuel López-Ibáñez manu at gcc dot gnu.org ---
(In reply to howarth from comment #5)
 It looks like the failure occurs when the java classes are being compiled.
 Can we revert r217383 until the flaw in its handling of the parallel make is
 resolved? Having to build gcc serially is very painful.

Can you try reverting it locally and making a diff of the build logs? It
doesn't make sense that a patch that only affects Fortran and does not change
any build files breaks libjava, but I guess everything is possible. The errors
that you mention do not clarify what is missing/broken. Isn't there any error
earlier produced by gcc or libtool?

[Bug testsuite/63830] c-c++-common/asan/strlen-overflow-1.c fails on x32

2014-11-12 Thread hjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63830

--- Comment #1 from hjl at gcc dot gnu.org hjl at gcc dot gnu.org ---
Author: hjl
Date: Wed Nov 12 12:54:00 2014
New Revision: 217417

URL: https://gcc.gnu.org/viewcvs?rev=217417root=gccview=rev
Log:
Avoid tail call in c-c++-common/asan/strlen-overflow-1.c

PR testsuite/63830
* c-c++-common/asan/strlen-overflow-1.c (main): Avoid tail call.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/c-c++-common/asan/strlen-overflow-1.c


[Bug testsuite/63830] c-c++-common/asan/strlen-overflow-1.c fails on x32

2014-11-12 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63830

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |5.0

--- Comment #2 from H.J. Lu hjl.tools at gmail dot com ---
Fixed.


[Bug bootstrap/63827] parallel make in libjava broken at r217383

2014-11-12 Thread howarth at bromo dot med.uc.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63827

--- Comment #8 from howarth at bromo dot med.uc.edu ---
(In reply to Manuel López-Ibáñez from comment #7)
 (In reply to howarth from comment #5)
  It looks like the failure occurs when the java classes are being compiled.
  Can we revert r217383 until the flaw in its handling of the parallel make is
  resolved? Having to build gcc serially is very painful.
 
 Can you try reverting it locally and making a diff of the build logs? It
 doesn't make sense that a patch that only affects Fortran and does not
 change any build files breaks libjava, but I guess everything is possible.
 The errors that you mention do not clarify what is missing/broken. Isn't
 there any error earlier produced by gcc or libtool?

Sorry about accidentally cc'ing you on this PR. This is breakage in the libjava
parallel make introduced by r217383.

[Bug ipa/63814] g++.dg/ipa/pr61160-1.C fails with -m32 on darwin14

2014-11-12 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63814

--- Comment #5 from Dominique d'Humieres dominiq at lps dot ens.fr ---
 Dominique, if you could pinpoint exactly the revision causing this, it
 would be great.  Most of us do not have access to a darwin machine.
 Thanks.

It was what I tried to do, but I finally found that the failures do not trigger
when gcc is configured with --enable-checking=release (probably obvious).

 This appeared between revisions r216154 (OK) and r216633 (ICE).

Then this should be replaced with

This appeared between revisions r216102 (OK) and r216633 (ICE).

I'll restart the bisection without --enable-checking=release!-(

Note that I have found the following problem

[Book15] f90/bug% /opt/gcc/gcc4.10p-216154p2b/bin/g++ -O3 --param
ipa-cp-eval-threshold=1 /opt/gcc/work/gcc/testsuite/g++.dg/ipa/pr61160-2.C
-std=gnu++11 -m32 -std=gnu++98
[Book15] f90/bug% a.out
Abort

where 216154p2b is r216154 with patches to bootstrap.


[Bug fortran/59298] ICE when initialising PARAMETER array of derived-type (containing an array) using array constructor

2014-11-12 Thread adam at aphirst dot karoo.co.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59298

--- Comment #5 from Adam Hirst adam at aphirst dot karoo.co.uk ---
I decided to check on the status of this bug in 4.9.2, as it's been a little
while, and the segmentation fault still occurs.

Interestingly, the test case that Janus posted on 2013-01-03 can be made to
compile and seemingly run correctly if the line
f = (planes(1)%M)
is replaced with
f = planes(1)%M

. and this also holds true for the test case I uploaded on 2013-11-26.

Perhaps this fact is of some interest, or might provide some insight into what
the underlying issue might be?


[Bug bootstrap/63827] parallel make in libjava broken at r217383

2014-11-12 Thread howarth at bromo dot med.uc.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63827

--- Comment #9 from howarth at bromo dot med.uc.edu ---
Now I see why I accidentally cc'd Manu. This breakage occurred in the commit
just prior to the jit commit which, as a fortune commit, indeed doesn't make
much sense.


[Bug bootstrap/63827] parallel make in libjava broken at r217383

2014-11-12 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63827

--- Comment #10 from dmalcolm at gcc dot gnu.org ---
(In reply to howarth from comment #9)
 Now I see why I accidentally cc'd Manu. This breakage occurred in the commit
 just prior to the jit commit which, as a fortune commit, indeed doesn't make
 much sense.

Sorry, I'm getting confused.  Can you clarify:
* the latest revision on trunk you know of that succeeds, and
* the earliest revision on trunk you know of that fails?
to narrow things down.

[alternatively, do you still think this the fault of my jit commit? (r217374)]

Thanks


[Bug bootstrap/63827] parallel make in libjava broken at r217383

2014-11-12 Thread howarth at bromo dot med.uc.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63827

--- Comment #11 from howarth at bromo dot med.uc.edu ---
(In reply to dmalcolm from comment #10)
 (In reply to howarth from comment #9)
  Now I see why I accidentally cc'd Manu. This breakage occurred in the commit
  just prior to the jit commit which, as a fortune commit, indeed doesn't make
  much sense.
 
 Sorry, I'm getting confused.  Can you clarify:
 * the latest revision on trunk you know of that succeeds, and
 * the earliest revision on trunk you know of that fails?
 to narrow things down.
 
 [alternatively, do you still think this the fault of my jit commit?
 (r217374)]
 
 Thanks

I am rerunning my tests. I can definitely say the bootstrap is broken
post-r217814 in the libjava parallel make. Retesting if r217813 is in play.
Also trying to make sure this problem is seen in a reduced build of
--enable-languages=c,c++,java compared with the
--enable-languages=c,c++,fortran,lto,objc,obj-c++,java which I normally test.


[Bug target/63815] [5 Regression] g++.dg/other/pr53811.C fails with -mcmodel=large -fpic

2014-11-12 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63815

--- Comment #10 from H.J. Lu hjl.tools at gmail dot com ---
(In reply to Uroš Bizjak from comment #9)
 (In reply to Uroš Bizjak from comment #8)
  (In reply to H.J. Lu from comment #7)
   Created attachment 33942 [details]
   A patch
  
  Please also add a testcase that will exercise this functionality.
 
 ... runtime testcase ...

Here is a testcase:

[hjl@gnu-6 tmp]$ cat foo.h 
struct ICCStringClass
{
  virtual int CreateString (int) = 0;
};

struct AGSCCDynamicObject
{
  virtual void Unserialize () = 0;
};


struct ScriptString:AGSCCDynamicObject, ICCStringClass
{
  virtual int CreateString (int);
  virtual void Unserialize ();
};
[hjl@gnu-6 tmp]$ cat foo1.cc 
#include foo.h

int
__attribute__ ((noinline))
CreateNewScriptString (int fromText, bool reAllocate = true)
{
  return fromText;
}

int
__attribute__ ((noinline))
ScriptString::CreateString (int fromText)
{
  return CreateNewScriptString (fromText);
}

void
__attribute__ ((noinline))
ScriptString::Unserialize ()
{
}
[hjl@gnu-6 tmp]$ cat foo2.cc 
#include foo.h

int
main ()
{
  ICCStringClass *x = new ScriptString;
  if (x-CreateString (1) != 1)
__builtin_abort ();
  return 0;
}
[hjl@gnu-6 tmp]$ g++ -shared -fpic -O2 -mcmodel=large -o libfoo.so foo1.cc 
[hjl@gnu-6 tmp]$ g++ foo2.cc ./libfoo.so 
[hjl@gnu-6 tmp]$ ./a.out 
Segmentation fault
[hjl@gnu-6 tmp]$ 

But I am having a hard time to add it to gcc testsuite.

[Bug middle-end/63761] [5 Regression] error: gimple_bb (stmt) is set to a wrong basic block

2014-11-12 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63761

Markus Trippelsdorf trippels at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Markus Trippelsdorf trippels at gcc dot gnu.org ---
Fixed. Thanks.


[Bug libgcc/63832] New: [5.0 Regression] crtstuff.c:400:19: warning: array subscript is above array bounds [-Warray-bounds]

2014-11-12 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63832

Bug ID: 63832
   Summary: [5.0 Regression] crtstuff.c:400:19: warning: array
subscript is above array bounds [-Warray-bounds]
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libgcc
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ubizjak at gmail dot com
Target: x86

Recently, gcc bootstrap starts to emit following warning when building CRT
support:

../../../gcc-svn/trunk/libgcc/crtstuff.c: In function ‘__do_global_dtors_aux’:
../../../gcc-svn/trunk/libgcc/crtstuff.c:400:19: warning: array subscript is
above array bounds [-Warray-bounds]
  f = __DTOR_LIST__[++dtor_idx];

where:

#ifdef DTOR_LIST_BEGIN
DTOR_LIST_BEGIN;
#elif defined(__LIBGCC_DTORS_SECTION_ASM_OP__)
asm (__LIBGCC_DTORS_SECTION_ASM_OP__);
STATIC func_ptr __DTOR_LIST__[1]
  __attribute__ ((aligned(sizeof(func_ptr
  = { (func_ptr) (-1) };
#else
STATIC func_ptr __DTOR_LIST__[1]
  __attribute__((section(.dtors), aligned(sizeof(func_ptr
  = { (func_ptr) (-1) };
#endif /* __DTOR_LIST__ alternatives */

...

#ifdef FINI_ARRAY_SECTION_ASM_OP
  /* If we are using .fini_array then destructors will be run via that
 mechanism.  */
#elif defined(HIDDEN_DTOR_LIST_END)
  {
/* Safer version that makes sure only .dtors function pointers are
   called even if the static variable is maliciously changed.  */
extern func_ptr __DTOR_END__[] __attribute__((visibility (hidden)));
static size_t dtor_idx;
const size_t max_idx = __DTOR_END__ - __DTOR_LIST__ - 1;
func_ptr f;

while (dtor_idx  max_idx)
  {
f = __DTOR_LIST__[++dtor_idx];
f ();
  }
  }
#else /* !defined (FINI_ARRAY_SECTION_ASM_OP) */
  {
static func_ptr *p = __DTOR_LIST__ + 1;
func_ptr f;

while ((f = *p))
  {
p++;
f ();
  }
  }
#endif /* !defined(FINI_ARRAY_SECTION_ASM_OP) */

[Bug target/63833] New: REAL_PIC_OFFSET_TABLE_REGNUM is wrong for x86-64

2014-11-12 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63833

Bug ID: 63833
   Summary: REAL_PIC_OFFSET_TABLE_REGNUM is wrong for x86-64
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hjl.tools at gmail dot com
CC: ubizjak at gmail dot com
Target: x86_64-linux

x86-64 psABI uses %r15 to hold the GOT base pointer in large model.
The first entry in the large model PLT is

PLT0: pushq 8(%r15)   # GOT[1]
  jmpq  *16(%r15) # GOT[2]

However, there is a typo in Register Usage table in x86-64 psABI:

%rbx  callee-saved register; optionally used as base pointer

Using %rbx for GOT will crash the large model PLT.  It should be

%rbx  callee-saved register
...
%r15  callee-saved register; optionally used as GOT base pointer

I proposed a change to Register Usage table in x86-64 psABI:

https://gcc.gnu.org/ml/gcc/2014-11/msg00161.html


[Bug c++/52961] Make -Wempty-body less noisy and enable it with -Wall

2014-11-12 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52961

Manuel López-Ibáñez manu at gcc dot gnu.org changed:

   What|Removed |Added

Summary|Missing warning on empty if |Make -Wempty-body less
   ||noisy and enable it with
   ||-Wall

--- Comment #10 from Manuel López-Ibáñez manu at gcc dot gnu.org ---
This warning is too noisy because it warns for:

if(a)
  ;
return 2;

which is often the result of macro expansion. Clang specifically does not warn
for this and suggests placing the ; on a different line to silence the
warning:


warning: if statement has empty body [-Wempty-body]
  if(a);
   ^
note: put the semicolon on a separate line to silence this warning

which seems a nicer way to silence the warning instead of ugly { ; }

[Bug c/49053] Please add an option to catch empty statements (-Wempty-statement ?)

2014-11-12 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49053

Manuel López-Ibáñez manu at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2014-11-12
 CC||manu at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Manuel López-Ibáñez manu at gcc dot gnu.org ---
Sorry, I don't understand what bug this is catching. ;; is inoffensive. My
fear is that this will trigger a lot for non-buggy code precisely because of
conditional macro expansion.

[Bug c++/58972] Lambda can't access private members

2014-11-12 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58972

Ville Voutilainen ville.voutilainen at gmail dot com changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |ville.voutilainen at 
gmail dot com

--- Comment #10 from Ville Voutilainen ville.voutilainen at gmail dot com ---
I'll take a look at this so that the Mighty Maintainer can work on eg. C++14
constexpr. :)


[Bug c/62184] [C/C++] Extend -Wempty-body to 'while' loops

2014-11-12 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62184

Manuel López-Ibáñez manu at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-11-12
 Ever confirmed|0   |1

--- Comment #4 from Manuel López-Ibáñez manu at gcc dot gnu.org ---
I'm going to confirm this. We definitely want this. The heuristic of Clang
seems quite elaborated: only warn when the ';' is on the same line and there is
a statement after it that starts at a higher column than the while.line.

void foo ()
{
#define EMPTY
  while (0)EMPTY;
foo(); // warns if preprocessed
  while (0);
   foo(); // warns
  while (0);
  foo(); // does not warn
  while (0); // does not warn
}

$ clang test.c 
test.c:6:12: warning: while loop has empty body [-Wempty-body]
  while (0);
   ^
test.c:6:12: note: put the semicolon on a separate line to silence this warning

$ clang test.c -save-temps
In file included from test.c:1:
test.c:4:12: warning: while loop has empty body [-Wempty-body]
  while (0);
   ^
test.c:4:12: note: put the semicolon on a separate line to silence this warning
test.c:6:12: warning: while loop has empty body [-Wempty-body]
  while (0);
   ^
test.c:6:12: note: put the semicolon on a separate line to silence this warning

[Bug bootstrap/63827] parallel make in libjava broken at r217383

2014-11-12 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63827

--- Comment #12 from Manuel López-Ibáñez manu at gcc dot gnu.org ---
(In reply to howarth from comment #11)
 I am rerunning my tests. I can definitely say the bootstrap is broken
 post-r217814 in the libjava parallel make. Retesting if r217813 is in play.
 Also trying to make sure this problem is seen in a reduced build of
 --enable-languages=c,c++,java compared with the
 --enable-languages=c,c++,fortran,lto,objc,obj-c++,java which I normally test.

If you are using --enable-checking=release, perhaps you are seeing:
https://gcc.gnu.org/ml/gcc-patches/2014-11/msg01240.html

[Bug libgcc/63832] [5.0 Regression] crtstuff.c:400:19: warning: array subscript is above array bounds [-Warray-bounds]

2014-11-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63832

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||diagnostic
   Target Milestone|--- |5.0


[Bug bootstrap/63827] parallel make in libjava broken at r217383

2014-11-12 Thread howarth at bromo dot med.uc.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63827

--- Comment #13 from howarth at bromo dot med.uc.edu ---
(In reply to Manuel López-Ibáñez from comment #12)
 (In reply to howarth from comment #11)

 If you are using --enable-checking=release, perhaps you are seeing:
 https://gcc.gnu.org/ml/gcc-patches/2014-11/msg01240.html

I'm not using --enable-checking= at all so for trunk that should default to
checking, no? So far, at r217382 and r217383 for the reduced language set of
c,c++,java, I don't see the bootstrap failure. I am currently testing
c,c++,fortran,java but my suspicion is that I may need the full language set of
c,c++,fortran,lto,objc,obj-c++,java to reproduce this here. If so, then would
imagine I am seeing a slight shift in the timing of the build what tickles a
latent parallel make issue in libjava. Certainly every failure I have seem
in...

make: INTERNAL: Exiting with 1 jobserver tokens available; should be 16!

appears associated with the build in the libjava directory.

[Bug c++/60420] [DR 1510] Bogus error: ‘const’ qualifiers cannot be applied to ‘int’ with lambda

2014-11-12 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60420

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |paolo.carlini at oracle 
dot com
Summary|[C++11] Bogus error:   |[DR 1510] Bogus error:
   |‘const’ qualifiers cannot   |‘const’ qualifiers cannot
   |be applied to ‘int’ with  |be applied to ‘int’ with
   |lambda  |lambda

[Bug preprocessor/63834] New: [5 Regression] unrecognised __has_attribute(xxxx) test causes segv (prevents bootstrap on darwin12).

2014-11-12 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63834

Bug ID: 63834
   Summary: [5 Regression] unrecognised __has_attribute() test
causes segv (prevents bootstrap on darwin12).
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: blocker
  Priority: P3
 Component: preprocessor
  Assignee: unassigned at gcc dot gnu.org
  Reporter: iains at gcc dot gnu.org

Created attachment 33947
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=33947action=edit
Test header

The changes at r217292 have introduced a segv for the attached testcase.

AFAICT the code is valid, this is used in a key system header on x86-64-darwin
so is a bootstrap blocker. Fails at stage#2 because libiberty's config.h
contains nonsense.

---

./gcc/xgcc -Bgcc avtest.h -E 

avtest.h:1:0: internal compiler error: Segmentation fault: 11
 #ifdef __has_attribute
 ^

avtest.h:1:0: internal compiler error: Abort trap: 6
xgcc: internal compiler error: Abort trap: 6 (program cc1)
Abort trap: 6


[Bug preprocessor/63834] [5 Regression] unrecognised __has_attribute(xxxx) test causes segv (prevents bootstrap on darwin12).

2014-11-12 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63834

Markus Trippelsdorf trippels at gcc dot gnu.org changed:

   What|Removed |Added

 CC||trippels at gcc dot gnu.org

--- Comment #1 from Markus Trippelsdorf trippels at gcc dot gnu.org ---
dup of PR63831?


[Bug preprocessor/63834] [5 Regression] unrecognised __has_attribute(xxxx) test causes segv (prevents bootstrap on darwin12).

2014-11-12 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63834

Iain Sandoe iains at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #2 from Iain Sandoe iains at gcc dot gnu.org ---
(In reply to Markus Trippelsdorf from comment #1)
 dup of PR63831?

yup looks like it...

*** This bug has been marked as a duplicate of bug 63831 ***


[Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM

2014-11-12 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63831

Iain Sandoe iains at gcc dot gnu.org changed:

   What|Removed |Added

 CC||iains at gcc dot gnu.org

--- Comment #1 from Iain Sandoe iains at gcc dot gnu.org ---
*** Bug 63834 has been marked as a duplicate of this bug. ***


[Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM

2014-11-12 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63831

Iain Sandoe iains at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-11-12
 Ever confirmed|0   |1

--- Comment #2 from Iain Sandoe iains at gcc dot gnu.org ---
confirmed - 
another trivial reproducer.

#ifdef __has_attribute
  #if __has_attribute(availability)
 /* use better attributes if possible */
  #endif
#endif

note - this blocks bootstrap on x86_64-darwin12, which uses that construct in
an unavoidable system header (it's only pure luck AFAICT that it doesn't break
on darwin13, and darwin14).


[Bug tree-optimization/63828] [5 Regression] g++.dg/ipa/devirt-47.C fails for x32

2014-11-12 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63828

--- Comment #5 from H.J. Lu hjl.tools at gmail dot com ---
Created attachment 33948
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=33948action=edit
A patch

Tested on Linux/32.


[Bug tree-optimization/63835] New: ICE on valid code at -Os and above on x86_64-linux-gnu

2014-11-12 Thread su at cs dot ucdavis.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63835

Bug ID: 63835
   Summary: ICE on valid code at -Os and above on x86_64-linux-gnu
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: su at cs dot ucdavis.edu

The following code causes an ICE when compiled with the current gcc trunk at
-Os and above on x86_64-linux-gnu in both 32-bit and 64-bit modes. 

It is a regression from 4.9.x. 

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/5.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/usr/local/gcc-trunk
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 5.0.0 2014 (experimental) [trunk revision 217365] (GCC) 

$ 
$ gcc-trunk -O1 -c small.c
$ gcc-4.9 -Os -c small.c
$ 
$ gcc-trunk -Os -c small.c
small.c: In function ‘fn2’:
small.c:13:1: error: non-trivial conversion at assignment
 }
 ^
int
unsigned int
_6 = a.1_3;
small.c:13:1: error: non-trivial conversion at assignment
int
unsigned int
_7 = a.1_3;
small.c:13:1: internal compiler error: verify_gimple failed
0xa87644 verify_gimple_in_cfg(function*, bool)
../../gcc-trunk/gcc/tree-cfg.c:5039
0x98fa56 execute_function_todo
../../gcc-trunk/gcc/passes.c:1868
0x9904c3 execute_todo
../../gcc-trunk/gcc/passes.c:1925
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See http://gcc.gnu.org/bugs.html for instructions.
$ 


--


int a;

int
fn1 (int p)
{
  return -p;
}

void
fn2 ()
{
  fn1 (-(unsigned int) a);
}

[Bug tree-optimization/63836] [5 Regression] r217349 caused segfault building 178.galgel from cpu2000

2014-11-12 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63836

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-11-12
   Target Milestone|--- |5.0
 Ever confirmed|0   |1


[Bug tree-optimization/63836] New: [5 Regression] r217349 caused segfault building 178.galgel from cpu2000

2014-11-12 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63836

Bug ID: 63836
   Summary: [5 Regression] r217349 caused segfault building
178.galgel from cpu2000
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hjl.tools at gmail dot com
CC: rguenther at suse dot de

On Linux/x86, r217349 caused:

gfortran -c -o lapak.o  -ffixed-form  -ffixed-line-length-132
-DSPEC_CPU2000_LP64 -O3 -funroll-loops -ffast-math   lapak.f90
...
lapak.f90:10714:0: internal compiler error: verify_gimple failed
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.
specmake: *** [lapak.o] Error 1


[Bug driver/63837] New: [5 Regression] r217391 causes kernel build errors with GCC_COMPARE_DEBUG=1

2014-11-12 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63837

Bug ID: 63837
   Summary: [5 Regression] r217391 causes kernel build errors with
GCC_COMPARE_DEBUG=1
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: driver
  Assignee: unassigned at gcc dot gnu.org
  Reporter: trippels at gcc dot gnu.org
CC: manu at gcc dot gnu.org

For example:

trippels@gcc2-power8 linux-3.17.2 % GCC_COMPARE_DEBUG=1 make
CC=/home/trippels/gcc_bisect/usr/local/bin/gcc -Werror -std=gnu89
  CHK include/config/kernel.release
  CHK include/generated/uapi/linux/version.h
  CHK include/generated/utsrelease.h
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/bin2c
  CC  kernel/bounds.s
  GEN include/generated/bounds.h
  CC  arch/powerpc/kernel/asm-offsets.s
In file included from include/linux/kobject.h:21:0,
 from include/linux/device.h:17,
 from include/linux/node.h:17,
 from include/linux/swap.h:10,
 from include/linux/suspend.h:4,
 from arch/powerpc/kernel/asm-offsets.c:24:
include/linux/sysfs.h: In function ‘sysfs_get_dirent’:
include/linux/sysfs.h:457:37: error: pointer targets in passing argument 2 of
‘kernfs_find_and_get’ differ in signedness [-Werror=pointer-sign]
  return kernfs_find_and_get(parent, name);
 ^
In file included from include/linux/cgroup.h:23:0,
 from include/linux/memcontrol.h:22,
 from include/linux/swap.h:8,
 from include/linux/suspend.h:4,
 from arch/powerpc/kernel/asm-offsets.c:24:
include/linux/kernfs.h:411:1: note: expected ‘const char *’ but argument is of
type ‘const unsigned char *’
 kernfs_find_and_get(struct kernfs_node *kn, const char *name)
 ^
cc1: all warnings being treated as errors
make[1]: *** [arch/powerpc/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2

Without GCC_COMPARE_DEBUG=1 the kernel builds fine.
Started with r217391.

[Bug libgcc/56846] _Unwind_Backtrace on ARM and noexcept

2014-11-12 Thread thopre01 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56846

--- Comment #11 from thopre01 at gcc dot gnu.org ---
(In reply to Yvan Roux from comment #9)
 Author: yroux
 Date: Mon Oct  6 12:25:14 2014
 New Revision: 215929
 
 URL: https://gcc.gnu.org/viewcvs?rev=215929root=gccview=rev
 Log:
 /libstdc++-v3/
 2014-10-06  Yvan Roux  yvan.r...@linaro.org
 
   Backport from trunk r215101.
   2014-09-10  Tony Wang  tony.w...@arm.com
 
   PR target/56846
   * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION):
   Return with CONTINUE_UNWINDING when the state pattern
   contains: _US_VIRTUAL_UNWIND_FRAME | _US_FORCE_UNWIND
 
 
 Modified:
 branches/linaro/gcc-4_9-branch/libstdc++-v3/ChangeLog.linaro
 branches/linaro/gcc-4_9-branch/libstdc++-v3/libsupc++/eh_personality.cc


Any chance you could backport for 4.8 Yvan? Do you want me to do it? Or are the
release manager against a 4.8 backport?

Best regards,

Thomas

[Bug bootstrap/63821] [5 Regression] ICE in verify_gimple during libgcc build starting with r217349

2014-11-12 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63821

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 CC||su at cs dot ucdavis.edu

--- Comment #10 from H.J. Lu hjl.tools at gmail dot com ---
*** Bug 63835 has been marked as a duplicate of this bug. ***


[Bug tree-optimization/63835] ICE on valid code at -Os and above on x86_64-linux-gnu

2014-11-12 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63835

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE
   Target Milestone|--- |5.0

--- Comment #1 from H.J. Lu hjl.tools at gmail dot com ---
Dup.

*** This bug has been marked as a duplicate of bug 63821 ***


[Bug tree-optimization/63836] [5 Regression] r217349 caused segfault building 178.galgel from cpu2000

2014-11-12 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63836

--- Comment #1 from H.J. Lu hjl.tools at gmail dot com ---
A simple testcase:

[hjl@gnu-mic-2 delta-fortran]$ cat foo.f90
  SUBROUTINE DTRSM ( NN, NB)
 DO 50 J = NN, 1, -NB
   50CONTINUE
  end
[hjl@gnu-mic-2 delta-fortran]$
/export/project/git/gcc-regression/master/217349/usr/bin/gfortran -ffixed-form 
-ffixed-line-length-132 -DSPEC_CPU2000_LP64 -ffast-math -S  foo.f90 -O2
foo.f90:4:0:

   end
 ^
Error: non-trivial conversion at assignment
unsigned int
integer(kind=4)
_13 = _7;
foo.f90:4:0: internal compiler error: verify_gimple failed
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.


[Bug libgcc/56846] _Unwind_Backtrace on ARM and noexcept

2014-11-12 Thread yroux at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56846

--- Comment #12 from Yvan Roux yroux at gcc dot gnu.org ---
Hi Thomas,

 Any chance you could backport for 4.8 Yvan? Do you want me to do it? Or are
 the release manager against a 4.8 backport?

Do you mean Linaro 4.8 branch ? if it is the case I'll not be able to do it
before tomorrow (which is our deadline for our 2014.11 source release).


[Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM

2014-11-12 Thread emsr at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63831

--- Comment #3 from emsr at gcc dot gnu.org ---
Created attachment 33949
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=33949action=edit
Quick patch.

I'm not on a box I can easily build and test.

Here is a quick one leaving aside the question of whether this cb needs defined
in other contests.

At least let's not not invoke non-existent cb.


[Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM

2014-11-12 Thread emsr at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63831

--- Comment #4 from emsr at gcc dot gnu.org ---
Can someone quick try that?


[Bug ipa/63838] New: [4.8/4.9/5 Regression] ipa-pure-const miscomputes can_throw

2014-11-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63838

Bug ID: 63838
   Summary: [4.8/4.9/5 Regression] ipa-pure-const miscomputes
can_throw
   Product: gcc
   Version: 4.9.2
Status: UNCONFIRMED
  Keywords: wrong-code
  Severity: normal
  Priority: P3
 Component: ipa
  Assignee: jakub at gcc dot gnu.org
  Reporter: jakub at gcc dot gnu.org

__attribute__((noinline, noclone)) static void bar (int);
volatile int v;
void (*fn) ();
struct S { S () { v++; } ~S () { v++; } };

__attribute__((noinline, noclone)) static void
foo (int x)
{
  v++;
  if (x == 5)
bar (x);
}

__attribute__((noinline, noclone)) static void
bar (int x)
{
  v++;
  if (x == 6)
foo (x);
  else if (x == 5)
fn ();
}

__attribute__((noinline, noclone)) int
baz (int x)
{
  S s;
  foo (x);
}

void
throw0 ()
{
  throw 0;
}

int
main ()
{
  fn = throw0;
  asm volatile ( : : : memory);
  try
{
  baz (5);
}
  catch (int)
{
}
}

is miscompiled with -O2 with g++ 4.6 and above (4.4 works, haven't tried 4.5),
r160312 works, r160406 already doesn't, -O2 -fno-ipa-pure-const works.


[Bug bootstrap/63821] [5 Regression] ICE in verify_gimple during libgcc build starting with r217349

2014-11-12 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63821

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

--- Comment #11 from H.J. Lu hjl.tools at gmail dot com ---
*** Bug 63836 has been marked as a duplicate of this bug. ***


[Bug tree-optimization/63836] [5 Regression] r217349 caused segfault building 178.galgel from cpu2000

2014-11-12 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63836

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #2 from H.J. Lu hjl.tools at gmail dot com ---
dup.

*** This bug has been marked as a duplicate of bug 63821 ***


[Bug ipa/63838] [4.8/4.9/5 Regression] ipa-pure-const miscomputes can_throw

2014-11-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63838

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2014-11-12
 CC||hubicka at gcc dot gnu.org
   Target Milestone|--- |4.8.4
 Ever confirmed|0   |1


[Bug ipa/63838] [4.8/4.9/5 Regression] ipa-pure-const miscomputes can_throw

2014-11-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63838

--- Comment #1 from Jakub Jelinek jakub at gcc dot gnu.org ---
Created attachment 33950
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=33950action=edit
gcc5-pr63838.patch

Untested fix.  For 4.9/4.8, perhaps just the
s/node-indirect_calls/w-indirect_calls/ can be done.


[Bug preprocessor/63834] [5 Regression] unrecognised __has_attribute(xxxx) test causes segv (prevents bootstrap on darwin12).

2014-11-12 Thread emsr at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63834

--- Comment #3 from emsr at gcc dot gnu.org ---
I posted a patch on https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63831 if here
anyone wants to test it before I can.

I'm away from my main machine ATM.


[Bug tree-optimization/63835] ICE on valid code at -Os and above on x86_64-linux-gnu

2014-11-12 Thread hjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63835

--- Comment #2 from hjl at gcc dot gnu.org hjl at gcc dot gnu.org ---
Author: hjl
Date: Wed Nov 12 18:56:50 2014
New Revision: 217441

URL: https://gcc.gnu.org/viewcvs?rev=217441root=gccview=rev
Log:
Add a testcase for PR tree-optimization/63835

PR tree-optimization/63835
* gcc.dg/pr63835.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/pr63835.c
Modified:
trunk/gcc/testsuite/ChangeLog


[Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM

2014-11-12 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63831

--- Comment #5 from Markus Trippelsdorf trippels at gcc dot gnu.org ---
(In reply to emsr from comment #4)
 Can someone quick try that?

Yes. It doesn't work. 

trippels@gcc2-power8 test % /home/trippels/gcc_test/usr/local/bin/g++ -I ./ -MM
test.cpp
./1.h:5:6: error: missing binary operator before token (
 #if  __has_attribute(alloc_size)
  ^


[Bug sanitizer/63839] New: ICE: tree check: expected ssa_name, have var_decl in simplify_builtin_call, at tree-ssa-forwprop.c:1441 with -fsanitize=unreachable

2014-11-12 Thread zsojka at seznam dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63839

Bug ID: 63839
   Summary: ICE: tree check: expected ssa_name, have var_decl in
simplify_builtin_call, at tree-ssa-forwprop.c:1441
with -fsanitize=unreachable
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: sanitizer
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zsojka at seznam dot cz
CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
jakub at gcc dot gnu.org, kcc at gcc dot gnu.org

Created attachment 33951
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=33951action=edit
reduced testcase

Compiler output:
$ gcc -O -fsanitize=unreachable testcase.C 
testcase.C: In function 'void bar()':
testcase.C:4:1: warning: 'noreturn' function does return
 }
 ^
testcase.C: In function 'void foo()':
testcase.C:8:1: internal compiler error: tree check: expected ssa_name, have
var_decl in simplify_builtin_call, at tree-ssa-forwprop.c:1441
 foo ()
 ^
0x1005d74 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
/mnt/svn/gcc-trunk/gcc/tree.c:9193
0xece266 tree_check(tree_node*, char const*, int, char const*, tree_code)
/mnt/svn/gcc-trunk/gcc/tree.h:2751
0xece266 simplify_builtin_call
/mnt/svn/gcc-trunk/gcc/tree-ssa-forwprop.c:1441
0xed1b11 execute
/mnt/svn/gcc-trunk/gcc/tree-ssa-forwprop.c:2489
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See http://gcc.gnu.org/bugs.html for instructions.

Tested revisions:
r217404 - ICE
4_9 r216937 - OK


[Bug preprocessor/63834] [5 Regression] unrecognised __has_attribute(xxxx) test causes segv (prevents bootstrap on darwin12).

2014-11-12 Thread emsr at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63834

--- Comment #4 from emsr at gcc dot gnu.org ---
__has_include, as opposed to __has_cpp_include may predate my patch.  I know
clang has it.  That might explain it showing up in darwin sys headers.

I might have to back off of __has_attribute at least for now.
__has_cpp_attribute is all that's required for SD-6.

I'll see how the latest patch works and we'll see from there.


[Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM

2014-11-12 Thread emsr at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63831

--- Comment #6 from emsr at gcc dot gnu.org ---
Created attachment 33952
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=33952action=edit
Just remove the define of the __has_attribute macro entirely.

Just remove the define of the __has_attribute macro entirely.

I don't really need it as long as we have __has_cpp_attribute.

Could someone try this s'il vous plait?

I might still want the code in the last patch.


[Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM

2014-11-12 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63831

--- Comment #7 from Markus Trippelsdorf trippels at gcc dot gnu.org ---
(In reply to emsr from comment #6)
 Created attachment 33952 [details]
 Just remove the define of the __has_attribute macro entirely.
 
 Just remove the define of the __has_attribute macro entirely.
 
 I don't really need it as long as we have __has_cpp_attribute.
 
 Could someone try this s'il vous plait?
 
 I might still want the code in the last patch.

Your second patch fixes the issue, even without the first one.


[Bug bootstrap/63740] [4.9 Regression] GCC 4.9.2 bootstrap fails on ARM, haifa-sched.c:6507:1: internal compiler error: in lra_create

2014-11-12 Thread aaro.koskinen at iki dot fi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63740

--- Comment #8 from Aaro Koskinen aaro.koskinen at iki dot fi ---
ICE backtrace seems to be same as in Bug 61430. The fix for that has not been
backported to 4.9 branch. I tested it and it seems to fix the issue at hand.

The fix: https://gcc.gnu.org/viewcvs/gcc?view=revisionrevision=211701

This patch should probably be backported as it is not currently possible to
compile GCC 4.9.2 release on ARM (or maybe some newer ARM archs work).


[Bug preprocessor/63831] [5 Regression] r217292 causes segfaults with -MM

2014-11-12 Thread emsr at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63831

--- Comment #8 from emsr at gcc dot gnu.org ---
Thank you.

I'll formalize this in a bit.


[Bug ipa/63671] [5 Regression] 21% tramp3d-v4 performance hit due to -fdevirtualize

2014-11-12 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63671

--- Comment #9 from Jan Hubicka hubicka at gcc dot gnu.org ---
With early VRP (but also without) the inliner seems to now suffer from extreme
roundoff errors at badness.  With VRP the first uninlined function still has
badness 0:

Considering std::_Bit_reference std::_Bit_reference::operator=(bool)/797 with
15 size
 to be inlined into built-in/47767 in /aux/hubicka/tramp3d-v4.cpp:38764
 Estimated badness is 0, frequency 0.71.
Badness calculation for built-in/47767 - std::_Bit_reference
std::_Bit_reference::operator=(bool)/797
  size growth 8, time 5 inline hints: declared_inline
  0: guessed profile. frequency 0.709000, benefit 0.002000%, time w/o
inlining 56, time w inlining 46 overall growth 612 (current) 398
(original)
  not inlinable: built-in/47767 - std::_Bit_reference
std::_Bit_reference::operator=(bool)/797, --param inline-unit-growth limit
reached
   Estimating body: std::basic_ostreamchar, _Traits
std::operator(std::basic_ostreamchar, _Traits, const char*) [with _Traits
= std::char_traitschar]/2076
   Known to be false: not inlined, op1 == 0B, op1 changed
   size:7 time:22

so inline decisions are basically random.  I tuned this few times, but it is
hard to balance the fixpoint arithmetic to not get into 0.  The function in
question is very small, but there are too many of them.

I wonder if we can't switch inliner to std::priority_queue and use sreal to
drive the priority queue? Or one can hold fractions and compare in wide int
calculations.


[Bug target/63815] [5 Regression] g++.dg/other/pr53811.C fails with -mcmodel=large -fpic

2014-11-12 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63815

--- Comment #11 from Uroš Bizjak ubizjak at gmail dot com ---
(In reply to H.J. Lu from comment #10)

 But I am having a hard time to add it to gcc testsuite.

IMO, the following should be sufficient:

--cut here--
Index: g++.dg/other/pr63815.C
===
--- g++.dg/other/pr63815.C  (revision 0)
+++ g++.dg/other/pr63815.C  (working copy)
@@ -0,0 +1,50 @@
+// PR target/63815
+// { dg-do run { target { { i?86-*-* x86_64-*-* }  lp64 } } }
+// { dg-options -mcmodel=large }
+// { dg-additional-options -fpic { target fpic } }
+
+struct ICCStringClass
+{
+  virtual int CreateString (int) = 0;
+};
+
+struct AGSCCDynamicObject
+{
+  virtual void Unserialize () = 0;
+};
+
+struct ScriptString:AGSCCDynamicObject, ICCStringClass
+{
+  virtual int CreateString (int);
+  virtual void Unserialize ();
+};
+
+int
+__attribute__ ((noinline))
+CreateNewScriptString (int fromText, bool reAllocate = true)
+{
+  return fromText;
+}
+
+int
+__attribute__ ((noinline))
+ScriptString::CreateString (int fromText)
+{
+  return CreateNewScriptString (fromText);
+}
+
+void
+__attribute__ ((noinline))
+ScriptString::Unserialize ()
+{
+}
+
+int
+main ()
+{
+  ICCStringClass *x = new ScriptString;
+
+  if (x-CreateString (1) != 1)
+__builtin_abort ();
+  return 0;
+}
--cut here--

Currently, this test crashes, and when fixed, there is little chance that the
(allocatable) PIC register from main equals r11 in the thunk.

[Bug target/63815] [5 Regression] g++.dg/other/pr53811.C fails with -mcmodel=large -fpic

2014-11-12 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63815

--- Comment #12 from Iain Sandoe iains at gcc dot gnu.org ---
if there's a guard for mcmodel=large support, that should be added
[since we have not had time to implement mcmodel=large for Darwin, I would
expect the test to fail there anyway]


[Bug bootstrap/63827] parallel make in libjava broken at r217383

2014-11-12 Thread howarth at bromo dot med.uc.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63827

howarth at bromo dot med.uc.edu changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WORKSFORME

--- Comment #14 from howarth at bromo dot med.uc.edu ---
Closing as the parallel make issue seems to have gone latent again in todays
svn pulls of gcc trunk.


[Bug target/63815] [5 Regression] g++.dg/other/pr53811.C fails with -mcmodel=large -fpic

2014-11-12 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63815

--- Comment #13 from Uroš Bizjak ubizjak at gmail dot com ---
(In reply to Iain Sandoe from comment #12)
 if there's a guard for mcmodel=large support, that should be added
 [since we have not had time to implement mcmodel=large for Darwin, I would
 expect the test to fail there anyway]

There is no guard for mcmodel that I know of, but

// { dg-do run { target { { i?86-*-linux* x86_64-*-linux* }  lp64 } } }

should also work.

[Bug target/63815] [5 Regression] g++.dg/other/pr53811.C fails with -mcmodel=large -fpic

2014-11-12 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63815

--- Comment #14 from H.J. Lu hjl.tools at gmail dot com ---
(In reply to Uroš Bizjak from comment #11)
 
 Currently, this test crashes, and when fixed, there is little chance that
 the (allocatable) PIC register from main equals r11 in the thunk.

Well, g++ 4.8 and 4.9 -fpic -mcmodel=large always generate

grep _GLOBAL_OFFSET_TABLE_ pr63815.s

movabsq$_GLOBAL_OFFSET_TABLE_-.L5, %r11
movabsq$_GLOBAL_OFFSET_TABLE_-.L8, %r11
movabsq$_GLOBAL_OFFSET_TABLE_-.L10, %r11
movabsq$_GLOBAL_OFFSET_TABLE_-.L12, %r11
movabsq$_GLOBAL_OFFSET_TABLE_-.L18, %r11

That is why I created libfoo.so since I couldn't get g++ 4.8 and 4.9 to
gail without libfoo.so.

[Bug c++/60420] [DR 1510] Bogus error: ‘const’ qualifiers cannot be applied to ‘int’ with lambda

2014-11-12 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60420

--- Comment #7 from paolo at gcc dot gnu.org paolo at gcc dot gnu.org ---
Author: paolo
Date: Wed Nov 12 20:43:09 2014
New Revision: 217444

URL: https://gcc.gnu.org/viewcvs?rev=217444root=gccview=rev
Log:
/cp
2014-11-12  Paolo Carlini  paolo.carl...@oracle.com

DR 1510
PR c++/60420
* cp-tree.h (struct cp_decl_specifier_seq): Add decltype_p bool field.
* decl.c (grokdeclarator): Use it.
* parser.c (cp_parser_simple_type_specifier): Likewise.
* pt.c (tsubst, case DECLTYPE_TYPE): Use tf_ignore_bad_quals.

/testsuite
2014-11-12  Paolo Carlini  paolo.carl...@oracle.com

DR 1510
PR c++/60420
* g++.dg/cpp0x/decltype61.C: New.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/decltype61.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/decl.c
trunk/gcc/cp/parser.c
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog


[Bug c++/60420] [DR 1510] Bogus error: ‘const’ qualifiers cannot be applied to ‘int’ with lambda

2014-11-12 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60420

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 CC|paolo.carlini at oracle dot com|
 Resolution|--- |FIXED
   Assignee|paolo.carlini at oracle dot com|unassigned at gcc dot 
gnu.org
   Target Milestone|--- |5.0

--- Comment #8 from Paolo Carlini paolo.carlini at oracle dot com ---
Done for 5.0.


[Bug libstdc++/63840] New: std::function copy constructor deletes an uninitialized pointer if new fails

2014-11-12 Thread tavianator at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63840

Bug ID: 63840
   Summary: std::function copy constructor deletes an
uninitialized pointer if new fails
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: tavianator at gmail dot com

Created attachment 33953
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=33953action=edit
Reproducer

std::function's copy constructor looks like this:

  templatetypename _Res, typename... _ArgTypes
function_Res(_ArgTypes...)::
function(const function __x)
: _Function_base()
{
  if (static_castbool(__x))
{
  _M_invoker = __x._M_invoker;
  _M_manager = __x._M_manager;
  __x._M_manager(_M_functor, __x._M_functor, __clone_functor);
}
}

_M_manager(..., __clone_functor) calls _M_clone, which looks like this when the
functor is stored on the heap:

static void
_M_clone(_Any_data __dest, const _Any_data __source, false_type)
{
  __dest._M_access_Functor*() =
new _Functor(*__source._M_access_Functor*());
}

If operator new or the copy-constructor throws, __dest._M_pod_data remains
uninitialized.  Then the stack unwinds, and ~_Function_base() gets called:

~_Function_base()
{
  if (_M_manager)
_M_manager(_M_functor, _M_functor, __destroy_functor);
}

Which ultimately calls

static void
_M_destroy(_Any_data __victim, false_type)
{
  delete __victim._M_access_Functor*();
}

Which deletes _M_pod_data.  A simple fix could be:

   templatetypename _Res, typename... _ArgTypes
 function_Res(_ArgTypes...)::
 function(const function __x)
 : _Function_base()
 {
   if (static_castbool(__x))
 {
+  __x._M_manager(_M_functor, __x._M_functor, __clone_functor);
   _M_invoker = __x._M_invoker;
   _M_manager = __x._M_manager;
-  __x._M_manager(_M_functor, __x._M_functor, __clone_functor);
 }
 }

I have a test case attached.


[Bug target/63815] [5 Regression] g++.dg/other/pr53811.C fails with -mcmodel=large -fpic

2014-11-12 Thread hjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63815

--- Comment #15 from hjl at gcc dot gnu.org hjl at gcc dot gnu.org ---
Author: hjl
Date: Wed Nov 12 21:16:14 2014
New Revision: 217445

URL: https://gcc.gnu.org/viewcvs?rev=217445root=gccview=rev
Log:
Initialize PIC register for large PIC model C++ thunk

gcc/

PR target/63815
* config/i386/i386.c (ix86_init_large_pic_reg): New.  Extracted
from ...
(ix86_init_pic_reg): Here.  Use ix86_init_large_pic_reg.
(x86_output_mi_thunk): Set PIC register to %r11.  Call
ix86_init_large_pic_reg to initialize PIC register.

gcc/testsuite/

PR target/63815
* g++.dg/other/pr63815.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/other/pr63815.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c
trunk/gcc/testsuite/ChangeLog


[Bug tree-optimization/63841] New: Incorrect strlen optimization after complete unroll

2014-11-12 Thread tejohnson at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63841

Bug ID: 63841
   Summary: Incorrect strlen optimization after complete unroll
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: tejohnson at google dot com

The following test fails with trunk:

$ cat bug_test.cc
#include cstdio
#include cassert
#include string

std::string __attribute__ ((noinline)) comp_test_write() {
  std::string data;

  for (int i = 0; i  2; ++i) {
char b = 1  (i * 8);
data.append(b, 1);
  }

  return data;
}

std::string __attribute__ ((noinline)) comp_test_write_good() {
  std::string data;

  char b;
  for (int i = 0; i  2; ++i) {
b = 1  (i * 8);
data.append(b, 1);
  }

  return data;
}

int main() {
  std::string bad = comp_test_write();
  printf(BAD: %hx\n, *(short*)bad.c_str());

  std::string good = comp_test_write_good();
  printf(GOOD: %hx\n, *(short*)good.c_str());

  return good != bad;
}

% g++ bug_test.cc -O2 
% a.out
BAD: 101
GOOD: 1

Notice that the difference between comp_test_write_good (GOOD) and
comp_test_write (BAD) is that declaration char b is moved outside the loop in
the good case.

In both cases cunrolli completely unrolls the loop. The main difference is that
there is a clobber at the start of the second unrolled iteration in the bad
case:

   # .MEM_26 = VDEF .MEM_25
  bD.13054 ={v} {CLOBBER};
  [./bug_test2.cc : 8:3] # DEBUG iD.13053 = 1
  # DEBUG iD.13053 = 1
  [./bug_test2.cc : 9:25] # .MEM_33 = VDEF .MEM_26
  bD.13054 = 0;
  [./bug_test2.cc : 10:23] [LP 2] # .MEM_34 = VDEF .MEM_33
  # USE = nonlocal null { D.12110 D.13054 D.13371 } (glob)
  # CLB = nonlocal null { D.12110 D.13054 D.13371 } (glob)
  _ZNSs6appendEPKcmD.11551 (data_4(D), bD.13054, 1);

Above is the code just before tree-strlen. The tree-strlen removes the
bD.13054 = 0 incorrectly. If I compile with -fdisable-tree-strlen the test
passes.

I tracked this down to the code in handle_char_store in tree-ssa-strlen.c with
the following comment:

  /* When storing '\0', the store can be removed
 if we know it has been stored in the current function.  */

When we hit this routine for the store bD.13054 = 0 there is a saved strinfo
struct that indicates there was a store to this string with length 0, and it
thinks it is safe to remove this null termination store.

The strinfo struct was created during the prior call to handle_char_store for
store bD.13054 ={v} {CLOBBER}. It is created with length zero because
initializer_zerop returns true for the RHS. The reason initializer_zerop
returns true is that the RHS is a constructor with 0 length. Therefore this
code in initializer_zerop:
FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (init), idx, elt)
  if (!initializer_zerop (elt))
return false;
return true;
falls through to the return true without executing any loop iterations.

A couple possible solutions that all work:
1) handle_char_store does not consider the store RHS to be a zero
initialization if the statement is a clobber.
2) initializer_zerop returns false if the constructor is a clobber
3) initializer_zerop returns false if there are no elements in the constructor
array.

It seems to me like #3 is the correct solution - I don't think an empty
constructor should be considered a zero initialization. The regression tests
pass with that change so I will send it for review


[Bug tree-optimization/63841] Incorrect strlen optimization after complete unroll

2014-11-12 Thread tejohnson at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63841

--- Comment #1 from Teresa Johnson tejohnson at google dot com ---
Google ref b/18344370


[Bug target/63610] Fixing the libtool bug for Yosemite (darwin14)

2014-11-12 Thread fxcoudert at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63610

Francois-Xavier Coudert fxcoudert at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |5.0

--- Comment #13 from Francois-Xavier Coudert fxcoudert at gcc dot gnu.org ---
Fixed on trunk. I don't see the need to back port to 4.9, since I don't see
many test suite failures on that branch. If you have evidence that a back port
would help, please reopen and add the new info.


[Bug target/63610] Fixing the libtool bug for Yosemite (darwin14)

2014-11-12 Thread howarth at bromo dot med.uc.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63610

--- Comment #14 from howarth at bromo dot med.uc.edu ---
(In reply to Francois-Xavier Coudert from comment #13)
 Fixed on trunk. I don't see the need to back port to 4.9, since I don't see
 many test suite failures on that branch. If you have evidence that a back
 port would help, please reopen and add the new info.

   You aren't seeing regressions because you're not setting
MACOSX_DEPLOYMENT_TARGET  during the gcc build. It took me days to puzzle that
out why a standalone build of gcc 4.9.2 on darwin14 produced clean test suite
results but one under the fink packaging system, which sets
MACOSX_DEPLOYMENT_TARGET, produced a huge number of regressions in the fortran
test suite.
   So you definitely do want to back port the configure/libtool.m4 fixes for
4.9.3.


[Bug ipa/63838] [4.8/4.9/5 Regression] ipa-pure-const miscomputes can_throw

2014-11-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63838

--- Comment #2 from Jakub Jelinek jakub at gcc dot gnu.org ---
Author: jakub
Date: Wed Nov 12 23:09:15 2014
New Revision: 217449

URL: https://gcc.gnu.org/viewcvs?rev=217449root=gccview=rev
Log:
PR ipa/63838
* ipa-pure-const.c (propagate_nothrow): Walk w-indirect_calls
chain instead of node-indirect_calls.  Put !can_throw into
conditions of all the loops.

* g++.dg/ipa/pr63838.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/ipa/pr63838.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-pure-const.c
trunk/gcc/testsuite/ChangeLog


[Bug sanitizer/63839] ICE: tree check: expected ssa_name, have var_decl in simplify_builtin_call, at tree-ssa-forwprop.c:1441 with -fsanitize=unreachable

2014-11-12 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63839

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-11-12
 CC||rguenther at suse dot de
   Target Milestone|--- |5.0
 Ever confirmed|0   |1

--- Comment #1 from H.J. Lu hjl.tools at gmail dot com ---
It was caused by r217213.


  1   2   >