[Bug target/51244] SH Target: Inefficient conditional branch

2012-09-04 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244

--- Comment #52 from Oleg Endo  2012-09-04 
08:03:08 UTC ---
Author: olegendo
Date: Tue Sep  4 08:03:01 2012
New Revision: 190909

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190909
Log:
PR target/51244
* config/sh/sh.c (prepare_cbranch_operands): Pull out comparison
canonicalization code into...
* (sh_canonicalize_comparison): This new function.
* config/sh/sh-protos.h: Declare it.
* config/sh/sh.h: Use it in new macro CANONICALIZE_COMPARISON.
* config/sh/sh.md (cbranchsi4): Remove TARGET_CBRANCHDI4 check and
always invoke expand_cbranchsi4.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/sh/sh-protos.h
trunk/gcc/config/sh/sh.c
trunk/gcc/config/sh/sh.h
trunk/gcc/config/sh/sh.md


[Bug fortran/54443] [4.7/4.8 Regression] Segmentation Fault when Compiling for code using Fortran Polymorphic Entities

2012-09-04 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54443

--- Comment #5 from janus at gcc dot gnu.org 2012-09-04 08:03:16 UTC ---
Author: janus
Date: Tue Sep  4 08:03:09 2012
New Revision: 190910

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190910
Log:
2012-09-04  Janus Weil  

PR fortran/54435
PR fortran/54443
* match.c (gfc_match_select_type): Make sure to only access CLASS_DATA
for BT_CLASS.

2012-09-04  Janus Weil  

PR fortran/54243
PR fortran/54244
* gfortran.dg/select_type_29.f03: New.

Added:
trunk/gcc/testsuite/gfortran.dg/select_type_29.f03
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/match.c
trunk/gcc/testsuite/ChangeLog


[Bug fortran/54244] [OOP] ICE in gfc_add_component_ref, at fortran/class.c:210

2012-09-04 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54244

--- Comment #5 from janus at gcc dot gnu.org 2012-09-04 08:03:18 UTC ---
Author: janus
Date: Tue Sep  4 08:03:09 2012
New Revision: 190910

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190910
Log:
2012-09-04  Janus Weil  

PR fortran/54435
PR fortran/54443
* match.c (gfc_match_select_type): Make sure to only access CLASS_DATA
for BT_CLASS.

2012-09-04  Janus Weil  

PR fortran/54243
PR fortran/54244
* gfortran.dg/select_type_29.f03: New.

Added:
trunk/gcc/testsuite/gfortran.dg/select_type_29.f03
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/match.c
trunk/gcc/testsuite/ChangeLog


[Bug target/54220] [avr] Potential stack corruption in naked functions at -O0

2012-09-04 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54220

--- Comment #1 from Georg-Johann Lay  2012-09-04 
09:08:54 UTC ---
Author: gjl
Date: Tue Sep  4 09:08:50 2012
New Revision: 190914

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190914
Log:
PR target/54220
* config/avr/avr.c (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): New
define to...
(avr_allocate_stack_slots_for_args): ...this new static function.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr.c


[Bug target/54220] [avr] Potential stack corruption in naked functions at -O0

2012-09-04 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54220

--- Comment #2 from Georg-Johann Lay  2012-09-04 
09:14:40 UTC ---
Author: gjl
Date: Tue Sep  4 09:14:36 2012
New Revision: 190916

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190916
Log:
Backport from 2012-09-04 mainline r190914
PR target/54220
* config/avr/avr.c (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): New
define to...
(avr_allocate_stack_slots_for_args): ...this new static function.


Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/config/avr/avr.c


[Bug target/54220] [avr] Potential stack corruption in naked functions at -O0

2012-09-04 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54220

--- Comment #3 from Georg-Johann Lay  2012-09-04 
09:21:24 UTC ---
Author: gjl
Date: Tue Sep  4 09:21:20 2012
New Revision: 190917

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190917
Log:
Backport from 2012-09-04 mainline r190914
PR target/54220
* config/avr/avr.c (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): New
define to...
(avr_allocate_stack_slots_for_args): ...this new static function.


Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/config/avr/avr.c


[Bug target/54220] [avr] Potential stack corruption in naked functions at -O0

2012-09-04 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54220

Georg-Johann Lay  changed:

   What|Removed |Added

 Target|AVR |avr
   Priority|P3  |P4
 Status|UNCONFIRMED |RESOLVED
 CC||gjl at gcc dot gnu.org
  Known to work||4.6.4, 4.7.2
 Resolution||FIXED
   Target Milestone|--- |4.7.2
  Known to fail||4.6.3, 4.7.1

--- Comment #4 from Georg-Johann Lay  2012-09-04 
09:25:52 UTC ---
Done.


[Bug tree-optimization/54458] [4.8 Regression] ICE get_loop_body, at cfgloop.c:830

2012-09-04 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54458

--- Comment #8 from Richard Guenther  2012-09-04 
09:29:02 UTC ---
Author: rguenth
Date: Tue Sep  4 09:28:58 2012
New Revision: 190918

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190918
Log:
2012-09-04  Richard Guenther  

PR tree-optimization/54458
* tree-ssa-threadupdate.c (thread_through_loop_header): If we
turn the loop into one with multiple latches mark it so.

* gcc.dg/torture/pr54458.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr54458.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-threadupdate.c


[Bug target/54476] Passing -1 to __builtin_avr_delay_cycles causes cc1 memory usage to explode on x86_64 host

2012-09-04 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54476

--- Comment #1 from Georg-Johann Lay  2012-09-04 
09:37:11 UTC ---
Author: gjl
Date: Tue Sep  4 09:37:08 2012
New Revision: 190920

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190920
Log:
PR target/54476
* config/avr/avr.c (avr_expand_delay_cycles): Mask operand with
SImode.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr.c


[Bug target/45070] Miscompiled c++ class with packed attribute on ARM with -Os optimizations (Qt 4.6.2)

2012-09-04 Thread amker at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45070

--- Comment #20 from amker at gcc dot gnu.org 2012-09-04 09:36:48 UTC ---
Author: amker
Date: Tue Sep  4 09:36:44 2012
New Revision: 190919

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190919
Log:

PR target/45070
* config/arm/arm.c (thumb1_extra_regs_pushed): Handle return value of size
less than 4 bytes by using macro ARM_NUM_INTS.
(thumb1_unexpanded_epilogue): Use macro ARM_NUM_INTS.


Modified:
trunk/gcc/config/arm/arm.c


[Bug target/54476] Passing -1 to __builtin_avr_delay_cycles causes cc1 memory usage to explode on x86_64 host

2012-09-04 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54476

--- Comment #2 from Georg-Johann Lay  2012-09-04 
09:38:48 UTC ---
Author: gjl
Date: Tue Sep  4 09:38:42 2012
New Revision: 190921

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190921
Log:
Backport from 2012-09-04 mainline r190920
PR target/54476
* config/avr/avr.c (avr_expand_delay_cycles): Mask operand with
SImode.


Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/config/avr/avr.c


[Bug target/54476] [avr] __builtin_avr_delay_cycles (-1ul) causes memory usage to explode on x86_64 host

2012-09-04 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54476

Georg-Johann Lay  changed:

   What|Removed |Added

 Target|AVR |avr
   Priority|P3  |P4
 Status|UNCONFIRMED |RESOLVED
   Keywords||compile-time-hog,
   ||memory-hog
 CC||gjl at gcc dot gnu.org
   Host|Linux x86_64|x86_64-linux-gnu
 Resolution||FIXED
Summary|Passing -1 to   |[avr]
   |__builtin_avr_delay_cycles  |__builtin_avr_delay_cycles
   |causes cc1 memory usage to  |(-1ul) causes memory usage
   |explode on x86_64 host  |to explode on x86_64 host
   Target Milestone|--- |4.7.2
  Build|4.8.0 20120903  |

--- Comment #3 from Georg-Johann Lay  2012-09-04 
09:44:02 UTC ---
Fixed


[Bug bootstrap/54419] [4.8 Regression] Compiling libstdc++-v3/src/c++11/random.cc fails on platforms not knowing rdrand

2012-09-04 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54419

--- Comment #21 from Dominique d'Humieres  
2012-09-04 10:27:58 UTC ---
> How about this patch?  Not sure whether this handles cross-compiling.  It 
> seems
> to work for me.

Before I test the patch, I am surprised to see that only two out of three
blocks

#if defined __i386__ || defined __x86_64__

are "protected" by  && defined _GLIBCXX_X86_RDRAND. Is it normal?

> I still think it's wrong to bother with obsolete assemblers...

Well, users have to deal with the tool chain they can get (I'ld be delighted to
have a working modern gas on darwin, but so far no one is providing it).


[Bug tree-optimization/54458] [4.8 Regression] ICE get_loop_body, at cfgloop.c:830

2012-09-04 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54458

Richard Guenther  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #9 from Richard Guenther  2012-09-04 
10:32:22 UTC ---
Fixed.


[Bug ada/54469] FAIL: gnat.dg/array11.adb (test for warnings, line 12)

2012-09-04 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54469

Dominique d'Humieres  changed:

   What|Removed |Added

 CC||ebotcazou at libertysurf
   ||dot fr, rguenther at suse
   ||dot de

--- Comment #1 from Dominique d'Humieres  2012-09-04 
10:37:09 UTC ---
I see the failure on powerpc-apple-darwin9 and x86_64-apple-darwin10. It
appeared between revisions 186998 and 187117. IIRC it is an expected fall out
of some patch and I followed the directive

> It probably fails everywhere, this is known, no point in opening a PR for such
> a benign regression during stage #1.

given in pr52823.


[Bug fortran/54474] [4.8 Regression]: gfortran.dg/coarray_poly_3.f90

2012-09-04 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54474

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-09-04
Version|4.7.0   |4.8.0
   Target Milestone|--- |4.8.0
 Ever Confirmed|0   |1

--- Comment #1 from Richard Guenther  2012-09-04 
10:39:35 UTC ---
Confirmed.


[Bug ada/54469] FAIL: gnat.dg/array11.adb (test for warnings, line 12)

2012-09-04 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54469

Richard Guenther  changed:

   What|Removed |Added

 Target|hppa*-*-* (32-bit)  |
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-09-04
 CC|rguenther at suse dot de|
   Host|hppa*-*-* (32-bit)  |
 Ever Confirmed|0   |1
  Build|hppa*-*-* (32-bit)  |

--- Comment #2 from Richard Guenther  2012-09-04 
10:41:46 UTC ---
Confirmed (fails everywhere).


[Bug fortran/54474] [4.8 Regression]: gfortran.dg/coarray_poly_3.f90

2012-09-04 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54474

--- Comment #2 from Dominique d'Humieres  2012-09-04 
10:44:28 UTC ---
Apparently Tobias is not around today. I have posted a potential fix at

http://gcc.gnu.org/ml/fortran/2012-09/msg8.html

tested on x86_64-apple-darwin10.


[Bug middle-end/54146] Very slow compile with attribute((flatten))

2012-09-04 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54146

--- Comment #60 from Steven Bosscher  2012-09-04 
10:50:47 UTC ---
Another improvement that can be done for the test case, is to assign
pseudo-register numbers such that the density of the DF_LR and DF_LIVE bitmaps
increases.

For the density I used the following definition here:
  size = (# list elts) * (# bits per elt)
  cardinality = (# bits set)
  density = cardinality / size

The average density we achieve for the DF_LR_IN sets of the largest function is
only 12%, and that number is misleading because there are a few elements with
almost all bits set and many elements with only a few bits set. For instance
there is one bitmap with the following statistics:

size = 50
cardinality = 940
density = 14.7%

but the per-element statistics show:

bits/eltcount
120
219
32
42
1247

so excluding the 7 dense elements (124 bits set out of 128), the density is
only 1.3%!

The dense bits are for a bunch of SRA variables, the sparse ones for ivtmp
variables. The ivtmp variables are live in mostly the same blocks as the SRA
variables (>10 blocks where the variables appear in DF_LR_IN of the block)
so the packing is extremely inefficient. This is the cause for most of the
slowness of DF on the test case: the bitmap chains are large and extremely
sparse.


[Bug target/54083] FAIL: gcc.dg/torture/pr53922.c on *-apple-darwin*

2012-09-04 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54083

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-09-04
 Ever Confirmed|0   |1

--- Comment #2 from Dominique d'Humieres  2012-09-04 
11:10:11 UTC ---
The failing test has been introduced by

Author: rguenth
Date: Fri Jul 13 11:21:39 2012
New Revision: 189461

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189461
Log:
2012-07-13  Richard Guenther  

PR tree-optimization/53922
* tree-vrp.c (value_inside_range): Change prototype to take
min/max instead of value-range.
(range_includes_zero_p): Likewise.  Return the result from
value_inside_range.
(extract_range_from_binary_expr_1): Adjust to handle dont-know
return value from range_includes_zero_p.
(extract_range_from_unary_expr_1): Likewise.
(compare_range_with_value): Likewise.
(vrp_meet_1): Likewise.

* gcc.dg/torture/pr53922.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr53922.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vrp.c


[Bug middle-end/54477] New: Inlining summary generation should not change the current function

2012-09-04 Thread jamborm at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54477

 Bug #: 54477
   Summary: Inlining summary generation should not change the
current function
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: jamb...@gcc.gnu.org


Currently (rev. 190872), we sometimes change the function body when
generating inlining summaries, specifically at some point in
loop_optimizer_init, which is called to get BB loop depths and loop
bounds predicates.

This happens for example when compiling function MAIN__ of
testsuite/gfortran.dg/bound_7.f90.  

Summary generations of IPA passes should not modify function bodies,
pass manager should do all such body changing analyses instead.
More information in
http://gcc.gnu.org/ml/gcc-patches/2012-09/msg00148.html and other
messages in that thread.


[Bug fortran/45586] [4.8 Regression] ICE non-trivial conversion at assignment

2012-09-04 Thread Joost.VandeVondele at mat dot ethz.ch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45586

Joost VandeVondele  changed:

   What|Removed |Added

URL||http://gcc.gnu.org/ml/fortr
   ||an/2012-08/msg00150.html

--- Comment #82 from Joost VandeVondele  
2012-09-04 12:22:12 UTC ---
URL for the current version of the patch added.


[Bug tree-optimization/46590] [4.6/4.7/4.8 Regression] long compile time with -O2 and many loops

2012-09-04 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46590

--- Comment #35 from Richard Guenther  2012-09-04 
13:17:53 UTC ---
With -O1 FRE uses loads of memory and compile-time.  Not the value-numbering
itself but compute_avail ()!  Bah.  Of course AVAIL sets get bigger and
bigger going down the dominator tree.  For FRE a single domwalk after
SCCVN computing "avail" and doing elimiation would be enough.  Especially
as all the overhead in AVAIL is just SSA DEFs and their value.


[Bug bootstrap/54478] New: Fails to bootstrap with GCC 4.3.6

2012-09-04 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54478

 Bug #: 54478
   Summary: Fails to bootstrap with GCC 4.3.6
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Keywords: build
  Severity: normal
  Priority: P3
 Component: bootstrap
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: rgue...@gcc.gnu.org


Recent vec.h changes make bootstrap fail with 4.3.6:

g++ -c   -g -DIN_GCC   -fno-exceptions -fno-rtti -W -Wall -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H
-DGENERATOR_FILE -I. -Ibuild -I/space/rguenther/src/svn/trunk/gcc
-I/space/rguenther/src/svn/trunk/gcc/build
-I/space/rguenther/src/svn/trunk/gcc/../include
-I/space/rguenther/src/svn/trunk/gcc/../libcpp/include 
-I/space/rguenther/src/svn/trunk/gcc/../libdecnumber
-I/space/rguenther/src/svn/trunk/gcc/../libdecnumber/bid -I../libdecnumber
-DCLOOG_INT_GMP\
> -o build/read-rtl.o 
> /space/rguenther/src/svn/trunk/gcc/read-rtl.c -save-temps
/space/rguenther/src/svn/trunk/gcc/vec.h: In static member function 'static T&
vec_t::safe_push(vec_t**, T, const char*, unsigned int, const char*)
[with vec_allocation_t A = heap, T = mapping*]':
/space/rguenther/src/svn/trunk/gcc/read-rtl.c:395:   instantiated from here
/space/rguenther/src/svn/trunk/gcc/vec.h:845: warning: left-hand operand of
comma has no effect
...
/space/rguenther/src/svn/trunk/gcc/vec.h:845: error: no match for 'operator<'
in 'vec_t::reserve [with vec_allocation_t A = A, T = mapping*] < heap'
/space/rguenther/src/svn/trunk/gcc/vec.h: In static member function 'static T*
vec_t::safe_push(vec_t**, const T*, const char*, unsigned int, const
char*) [with vec_allocation_t A = heap, T = iterator_use]':
...

seems to parse vec::safe_push () not as call.


[Bug bootstrap/54478] Fails to bootstrap with GCC 4.3.6

2012-09-04 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54478

--- Comment #1 from Richard Guenther  2012-09-04 
13:57:52 UTC ---
Created attachment 28129
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28129
preprocessed source


[Bug bootstrap/54478] [4.8 Regression] Fails to bootstrap with GCC 4.3.6

2012-09-04 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54478

Richard Guenther  changed:

   What|Removed |Added

  Known to work||4.4.6
   Target Milestone|--- |4.8.0
Summary|Fails to bootstrap with GCC |[4.8 Regression] Fails to
   |4.3.6   |bootstrap with GCC 4.3.6
  Known to fail||4.1.2, 4.3.6

--- Comment #2 from Richard Guenther  2012-09-04 
13:59:41 UTC ---
Not sure if non-GCC compilers are affected.


[Bug middle-end/54470] FAIL: gcc.dg/ipa/iinline-4.c scan-ipa-dump inline "hooray4[^\\n]*inline copy in test4"

2012-09-04 Thread jamborm at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54470

Martin Jambor  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-09-04
 CC||jamborm at gcc dot gnu.org
 Ever Confirmed|0   |1

--- Comment #1 from Martin Jambor  2012-09-04 
14:02:31 UTC ---
Yay, I can see this on gcc61.fsffrance.org too.  I will have a look
what is going on.


[Bug bootstrap/54479] New: Bootstrap with release-checking broken

2012-09-04 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54479

 Bug #: 54479
   Summary: Bootstrap with release-checking broken
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: rgue...@gcc.gnu.org


g++-4.6 -c  -DIN_GCC_FRONTEND -g -DIN_GCC   -fno-exceptions -fno-rtti -W -Wall
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -Ic
-I/space/rguenther/src/svn/trunk/gcc -I/space/rguenther/src/svn/trunk/gcc/c
-I/space/rguenther/src/svn/trunk/gcc/../include
-I/space/rguenther/src/svn/trunk/gcc/../libcpp/include 
-I/space/rguenther/src/svn/trunk/gcc/../libdecnumber
-I/space/rguenther/src/svn/trunk/gcc/../libdecnumber/bid -I../libdecnumber
-DCLOOG_INT_GMP/space/rguenther/src/svn/trunk/gcc/c/c-decl.c -o c/c-decl.o
In file included from /space/rguenther/src/svn/trunk/gcc/tree.h:29:0,
 from /space/rguenther/src/svn/trunk/gcc/c/c-decl.c:35:
/space/rguenther/src/svn/trunk/gcc/vec.h: In member function 'vec_t*
vec_t::copy() [with vec_allocation_t A = (vec_allocation_t)1u, T =
tree_node*]':
/space/rguenther/src/svn/trunk/gcc/c/c-decl.c:8590:7:   instantiated from here
/space/rguenther/src/svn/trunk/gcc/vec.h:702:7: error: call of overloaded
'reserve_exact(NULL, unsigned int&)' is ambiguous
/space/rguenther/src/svn/trunk/gcc/vec.h:702:7: note: candidates are:
/space/rguenther/src/svn/trunk/gcc/vec.h:1144:1: note: static vec_t*
vec_t::reserve_exact(vec_t*, int) [with vec_allocation_t A =
(vec_allocation_t)1u, T = tree_node*]
/space/rguenther/src/svn/trunk/gcc/vec.h:751:1: note: static bool
vec_t::reserve_exact(vec_t**, int) [with vec_allocation_t A =
(vec_allocation_t)1u, T = tree_node*]
make[3]: *** [c/c-decl.o] Error 1
make[3]: Leaving directory `/home/abuild/rguenther/obj2/gcc'


[Bug bootstrap/54419] [4.8 Regression] Compiling libstdc++-v3/src/c++11/random.cc fails on platforms not knowing rdrand

2012-09-04 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54419

--- Comment #22 from Jack Howarth  2012-09-04 
14:17:52 UTC ---
It seems that when clang is used as the system compiler we will have to use a
run-time test as well to determine drand support. On a 2009 Mac Pro, using...

int
main ()
{
  asm("rdrand %eax");
  return 0;
}

with Xcode 4.4.1's clang I get...

# clang test.c
#
# ./a.out
Illegal instruction

only by disabling clang's built-in assembler does the test fail at compile
time...

# clang -no-integrated-as test.c
/tmp/test-s3jHNR.s:15:no such instruction: `rdrand %eax'
clang: error: assembler command failed with exit code 1 (use -v to see
invocation)


[Bug rtl-optimization/54472] ICE (spill_failure): unable to find a register to spill in class 'AREG' with -O -fschedule-insns -fselective-scheduling

2012-09-04 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54472

--- Comment #2 from Uros Bizjak  2012-09-04 14:48:02 
UTC ---
For some reason, -fselective-scheduling is moving

(insn 19 16 22 2 (use (reg/i:SI 0 ax)) testcase.c:6 -1
 (nil))

around. This insn marks function return, so IMO should be at the function exit
all the time. -fschedule-insns (without -fselective-scheduling) leaves the insn
at the function exit. Is it OK to move this marker around?


[Bug c++/54437] [4.8 Regression] Revision 190664 causes Firefox build failure

2012-09-04 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54437

Jason Merrill  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-09-04
 Ever Confirmed|0   |1

--- Comment #3 from Jason Merrill  2012-09-04 
14:51:05 UTC ---
Further reduced:

template  void f(); 
class A {
  template  static void g();
  template  static void h () { f >(); }
  static void i() { h(); }
};


[Bug bootstrap/54479] Bootstrap with release-checking broken

2012-09-04 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54479

Diego Novillo  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2012-09-04
 AssignedTo|unassigned at gcc dot   |dnovillo at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1

--- Comment #1 from Diego Novillo  2012-09-04 
15:12:41 UTC ---
Reproduced.  Fixing.


[Bug bootstrap/54479] Bootstrap with release-checking broken

2012-09-04 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54479

--- Comment #2 from Diego Novillo  2012-09-04 
15:17:00 UTC ---
Author: dnovillo
Date: Tue Sep  4 15:16:51 2012
New Revision: 190937

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190937
Log:
PR bootstrap/54479
* vec.h (vec_t::copy): Add cast in call to reserve_exact.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/vec.h


[Bug bootstrap/54479] Bootstrap with release-checking broken

2012-09-04 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54479

Diego Novillo  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #3 from Diego Novillo  2012-09-04 
15:18:50 UTC ---
Fixed.


[Bug bootstrap/54453] [4.8 Regression] r190783 breaks bootstrap on powerpc64-unknown-linux-gnu

2012-09-04 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54453

--- Comment #9 from Steven Bosscher  2012-09-04 
15:28:46 UTC ---
Author: steven
Date: Tue Sep  4 15:28:39 2012
New Revision: 190939

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190939
Log:
PR bootstrap/54453
* include/Makefile.am: Fix regex.
* include/Makefile.in: Regenerate.


Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/Makefile.am
trunk/libstdc++-v3/include/Makefile.in


[Bug libstdc++/54468] type trait is_unsigned<...>::value for C++11 enum class with underlying unsigned type not true

2012-09-04 Thread daniel.kruegler at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54468

Daniel Krügler  changed:

   What|Removed |Added

 CC||daniel.kruegler at
   ||googlemail dot com

--- Comment #1 from Daniel Krügler  
2012-09-04 15:30:53 UTC ---
(In reply to comment #0)
> The is_unsigned<> type trait is not detecting the underlying signedness of a
> C++11 enum class or enum.

This is what the standard requires. The definition of is_unsigned is specified
as:

is_arithmetic::value && T(-1) < T(0)

Since enum types are no arithmetic types, the traits must return false for
either of these.


[Bug target/54480] New: Error: bad immediate value for offset

2012-09-04 Thread doko at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54480

 Bug #: 54480
   Summary: Error: bad immediate value for offset
Classification: Unclassified
   Product: gcc
   Version: 4.6.4
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: d...@gcc.gnu.org


Created attachment 28130
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28130
preprocessed source

seen with 4.6, 4,7 and trunk, on arm-linux-gnueabihf

works with -O2, fails with -O3

$ /usr/lib/gcc-snapshot/bin/gcc -c -mfloat-abi=hard -fno-strict-aliasing -g -O3
-fvisibility=hidden -fvisibility-inlines-hidden -fPIC FastMalloc.ii

/tmp/ccMcdYyn.s: Assembler messages:
/tmp/ccMcdYyn.s:3705: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:3708: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:4075: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:4078: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:4578: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:4581: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:5282: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:5285: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:6860: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:6863: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:7427: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:7430: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:9073: Error: bad immediate value for offset (-8)
/tmp/ccMcdYyn.s:9076: Error: bad immediate value for offset (-8)
/tmp/ccMcdYyn.s:9251: Error: bad immediate value for offset (-8)
/tmp/ccMcdYyn.s:9254: Error: bad immediate value for offset (-8)
/tmp/ccMcdYyn.s:10261: Error: bad immediate value for offset (-8)
/tmp/ccMcdYyn.s:10264: Error: bad immediate value for offset (-8)
/tmp/ccMcdYyn.s:10431: Error: bad immediate value for offset (-8)
/tmp/ccMcdYyn.s:10434: Error: bad immediate value for offset (-8)
/tmp/ccMcdYyn.s:10534: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:10537: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:10614: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:10617: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:12008: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:12011: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:12135: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:12138: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:12522: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:12525: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:12702: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:12705: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:13265: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:13268: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:13547: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:13550: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:14840: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:14843: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:15097: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:15100: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:16386: Error: bad immediate value for offset (3424)

/tmp/ccMcdYyn.s:16389: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:16809: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:16812: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:19119: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:19122: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:19377: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:19380: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:20614: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:20617: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:20870: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:20873: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:22513: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:22516: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:23218: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:23221: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:23359: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:23362: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:25316: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:25319: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:26032: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:26035: Error: bad immediate value for offset (3424)
/tmp/ccMcdYyn.s:26326: Error:

[Bug bootstrap/54419] [4.8 Regression] Compiling libstdc++-v3/src/c++11/random.cc fails on platforms not knowing rdrand

2012-09-04 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54419

--- Comment #23 from Jakub Jelinek  2012-09-04 
15:53:20 UTC ---
Why do you talk about clang?  This has nothing to do with it.  And, there is
already runtime check for whether RDRAND can be used in random.cc (though,
apparently insufficient for i?86 - it should use either __get_cpuid, or
__get_cpuid_max before __cpuid).  Not sure if on x86_64 it is guaranteed that
max basic level is always >= 1, if not, it also needs to test __get_cpuid_max.


[Bug bootstrap/54419] [4.8 Regression] Compiling libstdc++-v3/src/c++11/random.cc fails on platforms not knowing rdrand

2012-09-04 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54419

--- Comment #24 from Dominique d'Humieres  
2012-09-04 15:56:17 UTC ---
As such, the patch in commen #20 does not work:

(1) on x86_64-apple-darwin10 it gives

[macbook] gcc/p_build% grep -r rdr x86_64-apple-darwin10.8.0/*/config.log
x86_64-apple-darwin10.8.0/libstdc++-v3/config.log:ac_cv_x86_rdrand=yes

AFAICT this is due to the fact that "void f(void){asm("rdrand %eax");}" is
optimized out, thus the test passes.

Before reading comment #22, I have tested

  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
void f(void){asm("rdrand %eax");}
_ACEOF

which gives

x86_64-apple-darwin10.8.0/libstdc++-v3/config.log:conftest.c:167:no such
instruction: `rdrand %eax'
x86_64-apple-darwin10.8.0/libstdc++-v3/config.log:| void f(void){asm("rdrand
%eax");}
x86_64-apple-darwin10.8.0/libstdc++-v3/config.log:ac_cv_x86_rdrand=no

(2) I have asked in comment #21

> Before I test the patch, I am surprised to see that only two out of three
> blocks
>
> #if defined __i386__ || defined __x86_64__
> 
> are "protected" by  && defined _GLIBCXX_X86_RDRAND. Is it normal?

Thanks to the quick answer, without 

-#if (defined __i386__ || defined __x86_64__)
+#if (defined __i386__ || defined __x86_64__) && defined _GLIBCXX_X86_RDRAND

bootstrap fails with

../../../../../p_work/libstdc++-v3/src/c++11/random.cc: In member function
'std::random_device::result_type std::random_device::_M_getval()':
../../../../../p_work/libstdc++-v3/src/c++11/random.cc:124:27: error:
'__x86_rdrand' was not declared in this scope
   return __x86_rdrand();

With the two changes I have been able to bootstrap revision 190924 configured
with

../p_work/configure --prefix=/opt/gcc/gcc4.8p-190924p2
--enable-languages=c,c++,lto,fortran,ada,objc,obj-c++ --with-gmp=/opt/mp
--with-system-zlib --enable-checking=release --with-isl=/opt/mp --enable-lto
--enable-plugin --enable-build-with-cxx

I will now try to bootstrap with the following change in libstdc++-v3/configure

ac_cv_x86_rdrand=no
case "$target" in
  i?86-*-* | \
  x86_64-*-*)
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
int
main ()
{
  asm("rdrand %eax");
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  ac_cv_x86_rdrand=yes
else
  ac_cv_x86_rdrand=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
esac
if test $ac_cv_x86_rdrand = yes; then

$as_echo "#define _GLIBCXX_X86_RDRAND 1" >>confdefs.h

fi


[Bug bootstrap/54478] [4.8 Regression] Fails to bootstrap with GCC 4.3.6

2012-09-04 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54478

Diego Novillo  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2012-09-04
 CC||dnovillo at gcc dot gnu.org
 AssignedTo|unassigned at gcc dot   |dnovillo at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1

--- Comment #3 from Diego Novillo  2012-09-04 
16:04:04 UTC ---
Working on a fix.


[Bug regression/53964] regression: sparc64 FreeBSD: /usr/ports/lang/gcc46/work/build/./prev-gcc/include/stddef.h:150:26: error: two or more data types n declaration specifiers

2012-09-04 Thread mexas at bristol dot ac.uk
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53964

--- Comment #5 from Anton Shterenlikht  2012-09-04 
16:09:23 UTC ---
Still the same with gcc-4.6-20120831:

gmake[3]: Entering directory `/usr/ports/lang/gcc46/work/build/libcpp'
/usr/ports/lang/gcc46/work/build/./prev-gcc/xgcc
-B/usr/ports/lang/gcc46/work/build/./prev-gcc/
-B/sr/local/sparc64-portbld-freebsd10.0/bin/
-B/usr/local/sparc64-portbld-freebsd10.0/bin/
-B/usr/loca/sparc64-portbld-freebsd10.0/lib/ -isystem
/usr/local/sparc64-portbld-freebsd10.0/include -isystem
usr/local/sparc64-portbld-freebsd10.0/sys-include
-I.././../gcc-4.6-20120831/libcpp -I.
-I../././gcc-4.6-20120831/libcpp/../include
-I.././../gcc-4.6-20120831/libcpp/include  -g -O2 -gtoggle -W Wall
-Wwrite-strings -Wmissing-format-attribute -Wstrict-prototypes
-Wmissing-prototypes -Wold-styl-definition -Wc++-compat -pedantic
-Wno-long-long  -I.././../gcc-4.6-20120831/libcpp -I.
-I.././../cc-4.6-20120831/libcpp/../include
-I.././../gcc-4.6-20120831/libcpp/include  -c -o charset.o -MT chrset.o -MMD
-MP -MF .deps/charset.Tpo .././../gcc-4.6-20120831/libcpp/charset.c
In file included from .././../gcc-4.6-20120831/libcpp/system.h:30:0,
 from .././../gcc-4.6-20120831/libcpp/charset.c:22:
/usr/ports/lang/gcc46/work/build/./prev-gcc/include/stddef.h:150:26: error: two
or more data types n declaration specifiers
gmake[3]: *** [charset.o] Error 1


[Bug bootstrap/54419] [4.8 Regression] Compiling libstdc++-v3/src/c++11/random.cc fails on platforms not knowing rdrand

2012-09-04 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54419

--- Comment #25 from Dominique d'Humieres  
2012-09-04 16:14:01 UTC ---
I am now at stage 2 with

--- ../_clean/libstdc++-v3/configure2012-08-29 10:19:44.0 +0200
+++ ../p_work/libstdc++-v3/configure2012-09-04 17:51:54.0 +0200
@@ -3523,11 +3523,11 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}ma

 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
-# Always define AMTAR for backward compatibility.
+# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'

-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'



@@ -70621,6 +70621,31 @@ $as_echo "#define _GLIBCXX_LONG_DOUBLE_C
 esac


+ac_cv_x86_rdrand=no
+case "$target" in
+  i?86-*-* | \
+  x86_64-*-*)
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+int
+main ()
+{
+  asm("rdrand %eax");
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_x86_rdrand=yes
+else
+  ac_cv_x86_rdrand=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+esac
+if test $ac_cv_x86_rdrand = yes; then
+
+$as_echo "#define _GLIBCXX_X86_RDRAND 1" >>confdefs.h
+
+fi
+
 # This depends on GLIBCXX_ENABLE_SYMVERS and GLIBCXX_IS_NATIVE.

   if $GLIBCXX_IS_NATIVE ; then
--- ../_clean/libstdc++-v3/src/c++11/random.cc2012-08-30 00:56:27.0
+0200
+++ ../p_work/libstdc++-v3/src/c++11/random.cc2012-09-04 16:25:54.0
+0200
@@ -50,7 +50,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   return __ret;
 }

-#if defined __i386__ || defined __x86_64__
+#if (defined __i386__ || defined __x86_64__) && defined _GLIBCXX_X86_RDRAND
 unsigned int
 __attribute__ ((target("rdrnd")))
 __x86_rdrand(void)
@@ -75,7 +75,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul

 if (token == "default")
   {
-#if defined __i386__ || defined __x86_64__
+#if (defined __i386__ || defined __x86_64__) && defined _GLIBCXX_X86_RDRAND
 unsigned int eax, ebx, ecx, edx;
 __cpuid(0, eax, ebx, ecx, edx);
 // Check for "GenuineIntel"
@@ -119,7 +119,7 @@ namespace std _GLIBCXX_VISIBILITY(defaul
   random_device::result_type
   random_device::_M_getval()
   {
-#if (defined __i386__ || defined __x86_64__)
+#if (defined __i386__ || defined __x86_64__) && defined _GLIBCXX_X86_RDRAND
 if (! _M_file)
   return __x86_rdrand();
 #endif

Jack can you try it on you mac(s)?


[Bug c/54481] New: missed optimization: unnecessary indirect call

2012-09-04 Thread neleai at seznam dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54481

 Bug #: 54481
   Summary: missed optimization: unnecessary indirect call
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: nel...@seznam.cz


I got carried to far in Bug 54360.
Real problem was following:

struct s{
  int (*fn)(struct s*);
};
extern int foo (struct s* ) __attribute__ ((pure));
int main(){
  struct s a;
  a.fn=foo;
  int x,y;
  while(x=a.fn(&a)){
y++;
  }
  return y;
}

where gcc unnecessary uses indirect call because foo is pure.


[Bug bootstrap/54419] [4.8 Regression] Compiling libstdc++-v3/src/c++11/random.cc fails on platforms not knowing rdrand

2012-09-04 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54419

--- Comment #26 from Jack Howarth  2012-09-04 
16:37:07 UTC ---
(In reply to comment #23)
> Why do you talk about clang?  This has nothing to do with it.  And, there is
> already runtime check for whether RDRAND can be used in random.cc (though,
> apparently insufficient for i?86 - it should use either __get_cpuid, or
> __get_cpuid_max before __cpuid).  Not sure if on x86_64 it is guaranteed that
> max basic level is always >= 1, if not, it also needs to test __get_cpuid_max.

I mention clang because it is the system compiler on both Lion and Mountain
Lion
as of Xcode 4.4. The Apple clang 4.0 compiler defaults to its integrated
assembler
such that the simple test case...


int
main ()
{
  asm("rdrand %eax");
  return 0;
}

is compiled without errors into the assembly


.section__TEXT,__text,regular,pure_instructions
.globl  _main
.align  4, 0x90
_main:  ## @main
.cfi_startproc
## BB#0:
pushq   %rbp
Ltmp2:
.cfi_def_cfa_offset 16
Ltmp3:
.cfi_offset %rbp, -16
movq%rsp, %rbp
Ltmp4:
.cfi_def_cfa_register %rbp
movl$0, %eax
movl$0, -4(%rbp)
## InlineAsm Start
rdrand %eax
## InlineAsm End
popq%rbp
ret
.cfi_endproc


.subsections_via_symbols

This leaves config.log with ac_cv_x86_rdrand=yes which fails later in the
bootstrap when the newly built FSF gcc compiler is used and the legacy system
assembler is used.


[Bug bootstrap/54419] [4.8 Regression] Compiling libstdc++-v3/src/c++11/random.cc fails on platforms not knowing rdrand

2012-09-04 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54419

--- Comment #27 from Jack Howarth  2012-09-04 
16:47:47 UTC ---
(In reply to comment #25)
Your proposed patch from comment 25 appears to be working under clang 4.0 of
Xcode 4.4. The configure test is properly run against the newly built compiler
and fails against the system assembler as expected on darwin12. Thanks.


[Bug libstdc++/54482] New: catch-22 in static linking with libstdc++ fails

2012-09-04 Thread simonb at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54482

 Bug #: 54482
   Summary: catch-22 in static linking with libstdc++ fails
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: sim...@google.com


Libstdc++ uses '#ifdef PIC' as a proxy for deciding when to include versioned
symbols.

However, libtool will set -DPIC if -fPIC, even if the code being built is not
destined for a shared library.  This leads to versioned symbols being compiled
into libstdc++.a, and the resulting static libstdc++ can then fail to link. 
Can be triggered by 'configure --with-pic=yes ...' recommended by
__cxxabiv1::__forced_unwind.

See also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28811#c19

Example, using current 4.8 head at r190920:

$ cat /tmp/hello-world.cc
#include 
void func() {
  std::cout << "Hello, world" << std::endl;
}

$ configure --disable-bootstrap --enable-languages=c,c++
--build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu
--target=x86_64-unknown-linux-gnu
$ make..., make install...
g++ -shared -fPIC -static-libstdc++ -Wl,-whole-archive -o /dev/null
/tmp/hello-world.cc
/usr/bin/ld:
/usr/local/google/home/simonb/install_clean/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../lib64/libstdc++.a(compatibility.o):
relocation R_X86_64_32 against `_ZTIN10__cxxabiv115__forced_unwindE' can not be
used when making a shared object; recompile with -fPIC

$ configure --with-pic=yes --disable-bootstrap --enable-languages=c,c++
--build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu
--target=x86_64-unknown-linux-gnu
$ make..., make install...
$ ../install/bin/g++ -shared -fPIC -static-libstdc++ -Wl,-whole-archive -o
/dev/null /tmp/hello-world.cc
/usr/bin/ld: /dev/null: version node not found for symbol
_ZNKSt14basic_ifstreamIcSt11char_traitsIcEE7is_openEv@GLIBCXX_3.4


[Bug fortran/54474] [4.8 Regression]: gfortran.dg/coarray_poly_3.f90

2012-09-04 Thread hp at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54474

--- Comment #3 from Hans-Peter Nilsson  2012-09-04 
16:52:52 UTC ---
(In reply to comment #2)
> Apparently Tobias is not around today. I have posted a potential fix at
> 
> http://gcc.gnu.org/ml/fortran/2012-09/msg8.html

Though I'm not an approver, it looks obvious to me.  Thanks.


[Bug libstdc++/54172] [4.7/4.8 Regression] __cxa_guard_acquire thread-safety issue

2012-09-04 Thread rth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54172

Richard Henderson  changed:

   What|Removed |Added

 CC||rth at gcc dot gnu.org

--- Comment #8 from Richard Henderson  2012-09-04 
17:19:41 UTC ---
(In reply to comment #7)
> I posted the patches on Thursday, three patches because I found one more 
> issue,
> to both lists.

I havn't seen anything from you arrive on gcc-patches.
But I will say that the patch attached here looks good.


[Bug bootstrap/54419] [4.8 Regression] Compiling libstdc++-v3/src/c++11/random.cc fails on platforms not knowing rdrand

2012-09-04 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54419

--- Comment #28 from Jack Howarth  2012-09-04 
17:24:37 UTC ---
(In reply to comment #25)
This patch allows gcc trunk to completely bootstrap against clang 4.0 from
Xcode 4.4.1 on x86_64-apple-darwin12 using...

../gcc-4.8-20120904/configure --prefix=/sw --prefix=/sw/lib/gcc4.8
--mandir=/sw/share/man --infodir=/sw/lib/gcc4.8/info
--enable-languages=c,c++,fortran,lto,objc,obj-c++,java --with-gmp=/sw
--with-libiconv-prefix=/sw --with-isl=/sw --with-cloog=/sw --with-mpc=/sw
--with-system-zlib --enable-checking=yes --x-includes=/usr/X11R6/include
--x-libraries=/usr/X11R6/lib --program-suffix=-fsf-4.8


[Bug rtl-optimization/54472] ICE (spill_failure): unable to find a register to spill in class 'AREG' with -O -fschedule-insns -fselective-scheduling

2012-09-04 Thread abel at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54472

--- Comment #3 from Andrey Belevantsev  2012-09-04 
17:47:24 UTC ---
(In reply to comment #2)
> For some reason, -fselective-scheduling is moving
> 
> (insn 19 16 22 2 (use (reg/i:SI 0 ax)) testcase.c:6 -1
>  (nil))
> 
> around. This insn marks function return, so IMO should be at the function exit
> all the time. -fschedule-insns (without -fselective-scheduling) leaves the 
> insn
> at the function exit. Is it OK to move this marker around?

I will take a look but I'm out of office until Friday at least (maybe Monday).


[Bug libstdc++/54172] [4.7/4.8 Regression] __cxa_guard_acquire thread-safety issue

2012-09-04 Thread thiago at kde dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54172

--- Comment #9 from Thiago Macieira  2012-09-04 17:47:08 
UTC ---
(In reply to comment #8)
> (In reply to comment #7)
> > I posted the patches on Thursday, three patches because I found one more 
> > issue,
> > to both lists.
> 
> I havn't seen anything from you arrive on gcc-patches.
> But I will say that the patch attached here looks good.

http://gcc.gnu.org/ml/gcc-patches/2012-08/msg02026.html
http://gcc.gnu.org/ml/gcc-patches/2012-08/msg02027.html
http://gcc.gnu.org/ml/gcc-patches/2012-08/msg02028.html


[Bug bootstrap/54419] [4.8 Regression] Compiling libstdc++-v3/src/c++11/random.cc fails on platforms not knowing rdrand

2012-09-04 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54419

--- Comment #29 from Marc Glisse  2012-09-04 
18:24:05 UTC ---
(In reply to comment #26)

> The Apple clang 4.0 compiler defaults to its integrated
> assembler
> such that the simple test case...
> 
> 
> int
> main ()
> {
>   asm("rdrand %eax");
>   return 0;
> }
> 
> is compiled without errors into the assembly

[...]

> This leaves config.log with ac_cv_x86_rdrand=yes which fails later in the
> bootstrap when the newly built FSF gcc compiler is used and the legacy system
> assembler is used.

Er, why should this test ever be run with the system compiler? libstdc++ should
only ever be built by a newly built g++.


[Bug c++/54483] New: undefined reference to static constexpr in .so

2012-09-04 Thread baliga at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54483

 Bug #: 54483
   Summary: undefined reference to static constexpr in .so
Classification: Unclassified
   Product: gcc
   Version: 4.7.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: bal...@gmail.com


In a.hh 
-

class A {
  static constexpr float val = 0.08;

  public:
   bool foo(const float v);
};


In a.cc


bool A::foo(const float v) {
  return (v < -val);
}

Created a libfoo.so from the above code and linked this .so with another
executable using A::foo(const float) method.

Creating an executable result in "undefined reference to A::val"

If I replace val with -0.08 and change foo method with return (v < val), val is
getting inlined.


[Bug bootstrap/54478] [4.8 Regression] Fails to bootstrap with GCC 4.3.6

2012-09-04 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54478

--- Comment #4 from Diego Novillo  2012-09-04 
18:33:34 UTC ---
Author: dnovillo
Date: Tue Sep  4 18:33:29 2012
New Revision: 190943

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190943
Log:
This patch works around a parsing problem with g++ 4.3.  The parser is
failing to lookup calls to the template function reserve when called
from other member functions:

vec_t::reserve (...)

The parser thinks that the '<' in reserve is a less-than operation.
This problem does not happen after 4.3.

This code is going to change significantly, so this won't be needed
soon.

Tested on x86_64 with g++ 4.3 and g++ 4.6.

PR bootstrap/54478
* vec.h (vec_t::alloc): Remove explicit type specification
in call to reserve.
(vec_t::copy): Likewise.
(vec_t::reserve): Likewise.
(vec_t::reserve_exact): Likewise.
(vec_t::safe_splice): Likewise.
(vec_t::safe_push): Likewise.
(vec_t::safe_grow): Likewise.
(vec_t::safe_grow_cleared): Likewise.
(vec_t::safe_insert): Likewise.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/vec.h


[Bug bootstrap/54478] [4.8 Regression] Fails to bootstrap with GCC 4.3.6

2012-09-04 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54478

Diego Novillo  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #4 from Diego Novillo  2012-09-04 
18:33:34 UTC ---
Author: dnovillo
Date: Tue Sep  4 18:33:29 2012
New Revision: 190943

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190943
Log:
This patch works around a parsing problem with g++ 4.3.  The parser is
failing to lookup calls to the template function reserve when called
from other member functions:

vec_t::reserve (...)

The parser thinks that the '<' in reserve is a less-than operation.
This problem does not happen after 4.3.

This code is going to change significantly, so this won't be needed
soon.

Tested on x86_64 with g++ 4.3 and g++ 4.6.

PR bootstrap/54478
* vec.h (vec_t::alloc): Remove explicit type specification
in call to reserve.
(vec_t::copy): Likewise.
(vec_t::reserve): Likewise.
(vec_t::reserve_exact): Likewise.
(vec_t::safe_splice): Likewise.
(vec_t::safe_push): Likewise.
(vec_t::safe_grow): Likewise.
(vec_t::safe_grow_cleared): Likewise.
(vec_t::safe_insert): Likewise.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/vec.h

--- Comment #5 from Diego Novillo  2012-09-04 
18:34:14 UTC ---
Fixed.


[Bug bootstrap/54478] [4.8 Regression] Fails to bootstrap with GCC 4.3.6

2012-09-04 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54478

Diego Novillo  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #5 from Diego Novillo  2012-09-04 
18:34:14 UTC ---
Fixed.


[Bug c++/54437] [4.8 Regression] Revision 190664 causes Firefox build failure

2012-09-04 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54437

--- Comment #4 from Jason Merrill  2012-09-04 
18:50:03 UTC ---
Author: jason
Date: Tue Sep  4 18:49:51 2012
New Revision: 190946

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190946
Log:
PR c++/54437
PR c++/51213
* pt.c (fn_type_unification): Call coerce_template_parms before
entering substitution context.

Added:
trunk/gcc/testsuite/g++.dg/template/access24.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog


[Bug c++/51213] [C++11][DR 1170] Access control checking has to be done under SFINAE conditions

2012-09-04 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51213

--- Comment #15 from Jason Merrill  2012-09-04 
18:50:03 UTC ---
Author: jason
Date: Tue Sep  4 18:49:51 2012
New Revision: 190946

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190946
Log:
PR c++/54437
PR c++/51213
* pt.c (fn_type_unification): Call coerce_template_parms before
entering substitution context.

Added:
trunk/gcc/testsuite/g++.dg/template/access24.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog


[Bug libstdc++/54468] type trait is_unsigned<...>::value for C++11 enum class with underlying unsigned type not true

2012-09-04 Thread mhcox at bluezoosoftware dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54468

Michael H. Cox  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID

--- Comment #2 from Michael H. Cox  
2012-09-04 19:01:08 UTC ---
OK, sorry for the distraction.


[Bug c++/54437] [4.8 Regression] Revision 190664 causes Firefox build failure

2012-09-04 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54437

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #5 from Jason Merrill  2012-09-04 
19:04:06 UTC ---
Fixed.


[Bug rtl-optimization/54456] [4.8 Regression] ICE: in init_seqno, at sel-sched.c:6797 with -fschedule-insns -fselective-scheduling

2012-09-04 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54456

--- Comment #3 from Eric Botcazou  2012-09-04 
19:05:43 UTC ---
Author: ebotcazou
Date: Tue Sep  4 19:05:38 2012
New Revision: 190947

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190947
Log:
PR rtl-optimization/54456
* sched-rgn.c (gate_handle_sched): Return 1 only if optimize > 0.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/sched-rgn.c


[Bug rtl-optimization/54456] [4.8 Regression] ICE: in init_seqno, at sel-sched.c:6797 with -fschedule-insns -fselective-scheduling

2012-09-04 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54456

Eric Botcazou  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #4 from Eric Botcazou  2012-09-04 
19:12:23 UTC ---
Patch applied.


[Bug libstdc++/54314] [4.8 Regression] undefined references to 'construction vtable for std::ostream-in-std::basic_ostringstream, std::allocator >'

2012-09-04 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54314

Jason Merrill  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org
  Component|c++ |libstdc++

--- Comment #7 from Jason Merrill  2012-09-04 
19:28:31 UTC ---
Changing component to libstdc++.


[Bug c++/54198] [4.8 Regression] "error: invalid use of incomplete type" when building Chromium

2012-09-04 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54198

--- Comment #5 from Jason Merrill  2012-09-04 
19:35:08 UTC ---
Author: jason
Date: Tue Sep  4 19:35:02 2012
New Revision: 190949

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190949
Log:
PR c++/54198
* decl.c (check_default_argument): Set cp_unevaluated_operand
around call to perform_implicit_conversion_flags.

Added:
trunk/gcc/testsuite/g++.dg/template/defarg15.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/testsuite/ChangeLog


[Bug c++/54198] [4.8 Regression] "error: invalid use of incomplete type" when building Chromium

2012-09-04 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54198

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #6 from Jason Merrill  2012-09-04 
19:37:34 UTC ---
Fixed.


[Bug target/54480] Error: bad immediate value for offset

2012-09-04 Thread ramana at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54480

Ramana Radhakrishnan  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||ramana at gcc dot gnu.org
 Resolution||INVALID

--- Comment #1 from Ramana Radhakrishnan  2012-09-04 
19:37:34 UTC ---
Problem is because the input is invalid . We just end up generating 

ldrex r0, [r1, #-24] . 


asm volatile(
"movw %1, #1\n\t"
"ldrex %2, %0\n\t"
"cmp %3, %2\n\t"
"bne.n 0f\n\t"
"strex %1, %4, %0\n\t"
"0:"
: "+m"(*location), "=&r"(result), "=&r"(tmp)
: "r"(expected), "r"(newValue)
: "memory");


Eh - you can't use m for a constraint to an address in ldrex . Try "+Q"
instead.
regards,
Ramana


[Bug target/54414] ARM:mis-compiled prologue/epilogue on cortex-m0 when optimizing with -Os

2012-09-04 Thread ramana at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54414

Ramana Radhakrishnan  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||ramana at gcc dot gnu.org
 Resolution||DUPLICATE

--- Comment #2 from Ramana Radhakrishnan  2012-09-04 
19:42:16 UTC ---
dup of 45070

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


[Bug other/54398] Incorrect ARM assembly when building with -fno-omit-frame-pointer -O2

2012-09-04 Thread ramana at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54398

Ramana Radhakrishnan  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2012-09-04
 CC||ramana at gcc dot gnu.org
 Ever Confirmed|0   |1


[Bug tree-optimization/54295] [4.7/4.8 regression] Widening multiply-accumulate operation uses wrong value extension

2012-09-04 Thread ramana at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54295

Ramana Radhakrishnan  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-09-04
 CC||ramana at gcc dot gnu.org
 Ever Confirmed|0   |1


[Bug target/45070] Miscompiled c++ class with packed attribute on ARM with -Os optimizations (Qt 4.6.2)

2012-09-04 Thread ramana at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45070

Ramana Radhakrishnan  changed:

   What|Removed |Added

 CC||amker.cheng at gmail dot
   ||com

--- Comment #21 from Ramana Radhakrishnan  
2012-09-04 19:42:16 UTC ---
*** Bug 54414 has been marked as a duplicate of this bug. ***


[Bug target/54168] ARM: Redundant instructions emitted at -O3

2012-09-04 Thread ramana at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54168

Ramana Radhakrishnan  changed:

   What|Removed |Added

   Keywords||missed-optimization
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-09-04
 CC||ramana at gcc dot gnu.org
 Ever Confirmed|0   |1


[Bug c/54303] -fdata-sections -ffunction-sections and -fmerge-constants do not work well together

2012-09-04 Thread ramana at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54303

Ramana Radhakrishnan  changed:

   What|Removed |Added

 Target|ARM |arm*, x86_64-linux-gnu
 Status|UNCONFIRMED |RESOLVED
 CC||ramana at gcc dot gnu.org
 Resolution||INVALID

--- Comment #3 from Ramana Radhakrishnan  2012-09-04 
19:51:07 UTC ---
Someone needs to tell the linker to garbage collect sections  -Wl,
--gc-sections ?


[Bug translation/54067] arm-none-eabi with -mapcs and attribute((interrupt)) generates wrong stack alignment

2012-09-04 Thread ramana at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54067

Ramana Radhakrishnan  changed:

   What|Removed |Added

   Keywords||wrong-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-09-04
 CC||ramana at gcc dot gnu.org
 Ever Confirmed|0   |1
  Known to fail||4.7.1, 4.8.0


[Bug bootstrap/54484] New: r190927 breaks bootstrap with clang compiler

2012-09-04 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54484

 Bug #: 54484
   Summary: r190927 breaks bootstrap with clang compiler
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: howa...@nitro.med.uc.edu


r190927 | dnovillo | 2012-09-04 09:22:54 -0400 (Tue, 04 Sep 2012) | 97 lines

Make all VEC_* functions, member functions of vec_t.
,,,

breaks the bootstrap of gcc trunk using the clang++ compiler. The failures are
of the form...

# clang++ -c   -g -DIN_GCC   -fno-exceptions -fno-rtti -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H
-DGENERATOR_FILE -I. -Ibuild -I../../gcc-4.8-20120904/gcc
-I../../gcc-4.8-20120904/gcc/build -I../../gcc-4.8-20120904/gcc/../include
-I../../gcc-4.8-20120904/gcc/../libcpp/include -I/sw/include -I/sw/include 
-I../../gcc-4.8-20120904/gcc/../libdecnumber
-I../../gcc-4.8-20120904/gcc/../libdecnumber/dpd -I../libdecnumber
-DCLOOG_INT_GMP -I/sw/include -I/sw/include -I/sw/include \
-o build/print-rtl.o ../../gcc-4.8-20120904/gcc/print-rtl.c? -o
build/print-rtl.o ../../gcc-4.8-20120904/gcc/print-rtl.c
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is
deprecated
In file included from ../../gcc-4.8-20120904/gcc/print-rtl.c:33:
In file included from ../../gcc-4.8-20120904/gcc/rtl.h:29:
../../gcc-4.8-20120904/gcc/vec.h:619:42: error: default arguments cannot be
added to an out-of-line definition of a member of a class template
vec_t::embedded_init (int nelems, int active = 0)
 ^~
../../gcc-4.8-20120904/gcc/vec.h:1078:17: warning: unused parameter 'lessthan_'
[-Wunused-parameter]
   bool (*lessthan_)(const T *, const T *)) const
  ^
1 warning and 1 error generated.

# clang++ -c   -g -DIN_GCC   -fno-exceptions -fno-rtti -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H
-DGENERATOR_FILE -I. -Ibuild -I../../gcc-4.8-20120904/gcc
-I../../gcc-4.8-20120904/gcc/build -I../../gcc-4.8-20120904/gcc/../include
-I../../gcc-4.8-20120904/gcc/../libcpp/include -I/sw/include -I/sw/include 
-I../../gcc-4.8-20120904/gcc/../libdecnumber
-I../../gcc-4.8-20120904/gcc/../libdecnumber/dpd -I../libdecnumber
-DCLOOG_INT_GMP -I/sw/include -I/sw/include -I/sw/include \
-o build/gensupport.o ../../gcc-4.8-20120904/gcc/gensupport.c? -o
build/gensupport.o ../../gcc-4.8-20120904/gcc/gensupport.c
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is
deprecated
In file included from ../../gcc-4.8-20120904/gcc/gensupport.c:25:
In file included from ../../gcc-4.8-20120904/gcc/rtl.h:29:
../../gcc-4.8-20120904/gcc/vec.h:619:42: error: default arguments cannot be
added to an out-of-line definition of a member of a class template
vec_t::embedded_init (int nelems, int active = 0)
 ^~
../../gcc-4.8-20120904/gcc/vec.h:1078:17: warning: unused parameter 'lessthan_'
[-Wunused-parameter]
   bool (*lessthan_)(const T *, const T *)) const
  ^
1 warning and 1 error generated.

# clang++  -c   -g -DIN_GCC   -fno-exceptions -fno-rtti -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H
-DGENERATOR_FILE -I. -Ibuild -I../../gcc-4.8-20120904/gcc
-I../../gcc-4.8-20120904/gcc/build -I../../gcc-4.8-20120904/gcc/../include
-I../../gcc-4.8-20120904/gcc/../libcpp/include -I/sw/include -I/sw/include 
-I../../gcc-4.8-20120904/gcc/../libdecnumber
-I../../gcc-4.8-20120904/gcc/../libdecnumber/dpd -I../libdecnumber
-DCLOOG_INT_GMP -I/sw/include -I/sw/include -I/sw/include \
-o build/read-rtl.o ../../gcc-4.8-20120904/gcc/read-rtl.c? -o
build/read-rtl.o ../../gcc-4.8-20120904/gcc/read-rtl.c
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is
deprecated
In file included from ../../gcc-4.8-20120904/gcc/read-rtl.c:30:
In file included from ../../gcc-4.8-20120904/gcc/rtl.h:29:
../../gcc-4.8-20120904/gcc/vec.h:619:42: error: default arguments cannot be
added to an out-of-line definition of a member of a class template
vec_t::embedded_init (int nelems, int active = 0)
 ^~
../../gcc-4.8-20120904/gcc/vec.h:1078:17: warning: unused parameter 'lessthan_'
[-Wunused-parameter]
   bool (*lessthan_)(const T *, const T *)) const
  ^
1 warning and 1 error generated.


[Bug bootstrap/54484] r190927 breaks bootstrap with clang compiler

2012-09-04 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54484

--- Comment #1 from Jack Howarth  2012-09-04 
20:21:23 UTC ---
Bootstrap failure remains at r190949.


[Bug c/54303] -fdata-sections -ffunction-sections and -fmerge-constants do not work well together

2012-09-04 Thread tom.rini at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54303

Tom Rini  changed:

   What|Removed |Added

 Target|arm*, x86_64-linux-gnu  |arm*-linux-gnu

--- Comment #4 from Tom Rini  2012-09-04 20:34:18 
UTC ---
(In reply to comment #3)
> Someone needs to tell the linker to garbage collect sections  -Wl,
> --gc-sections ?

Please re-read the initial post.  This works, as expected on x86_64 and does
NOT on ARM as on ARM all of the strings are placed into a single .rodata
section while on x86_64 they are placed into per-function sections.


[Bug c/54303] -fdata-sections -ffunction-sections and -fmerge-constants do not work well together

2012-09-04 Thread tom.rini at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54303

Tom Rini  changed:

   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
 Resolution|INVALID |

--- Comment #5 from Tom Rini  2012-09-04 20:35:56 
UTC ---
Putting back as unconfirmed.


[Bug ada/54469] FAIL: gnat.dg/array11.adb (test for warnings, line 12)

2012-09-04 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54469

Eric Botcazou  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||ebotcazou at gcc dot
   ||gnu.org
 Resolution||WONTFIX

--- Comment #3 from Eric Botcazou  2012-09-04 
20:48:05 UTC ---
No point in opening a PR during stage #1 for a failure that has been there for
months on all platforms.


[Bug bootstrap/54484] r190927 breaks bootstrap with clang compiler

2012-09-04 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54484

--- Comment #2 from Diego Novillo  2012-09-04 
21:07:56 UTC ---
Author: dnovillo
Date: Tue Sep  4 21:07:48 2012
New Revision: 190951

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190951
Log:
Fix bootstrap failure with clang++.

This patch fixes a bootstrap failure when using clang as the host
compiler.  Default arguments for class template member functions
should be added in the declaration, not the definition.

>From Jason:

> 8.3.6 says "Default arguments for a member function of a class template shall
> be specified on the initial declaration of the member function within the
> class template."

PR bootstrap/54484
* vec.h (vec_t::embedded_init): Move default argument value
to function declaration.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/vec.h


[Bug bootstrap/54484] r190927 breaks bootstrap with clang compiler

2012-09-04 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54484

Diego Novillo  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||dnovillo at gcc dot gnu.org
 Resolution||FIXED

--- Comment #3 from Diego Novillo  2012-09-04 
21:09:59 UTC ---
Fixed.  From the IRC discussion:

16:55dnovillojason: ping
16:55jasondnovillo: pong
16:55dnovillojason: in
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54484, is g++ being too lenient?
16:55gccbotBug 54484: normal, P3, ---, unassigned, UNCONFIRMED ,
r190927 breaks bootstrap with clang compiler
16:55dnovillojason: i put the default value in the *definition* of the
function, not the declaration.
16:56dnovilloi am fixing it with:
16:56dnovillo-  void embedded_init (int, int);
+  void embedded_init (int, int = 0);
16:56dnovilloand removing the dflt value from the definition.
16:56jasonhmm
16:56dnovillothis pacifies clang++, but i'm not sure whether clang++ is
being too picky
16:57dnovilloor g++ too lenient.
16:59dnovilloa cursory search on the web says that clang++ is correct:
http://clang-developers.42468.n3.nabble.com/default-arguments-cannot-be-added-to-an-out-of-line-definition-of-a-member-of-a-class-template-td3182781.html
17:00jasondnovillo: yes, clang seems to be right
17:00jasonI wonder why that restriction is there
17:00dnovillook, should i file a g++ bug?
17:01jasonsure
17:01jason8.3.6 says "Default arguments for a member function of a
class template
17:01jasonshall be specified on the initial declaration of the member
function within the class template."


[Bug c++/54485] New: g++ should diagnose default arguments in out-of-line definitions for template class member functions

2012-09-04 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54485

 Bug #: 54485
   Summary: g++ should diagnose default arguments in out-of-line
definitions for template class member functions
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Keywords: accepts-invalid
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: dnovi...@gcc.gnu.org
CC: ja...@gcc.gnu.org


In PR 54484, bootstraps were broken with clang++.  The template class vec_t had
a member function with default arguments, but the default values were specified
in the function definition, instead of its declaration.

According to 8.3.6, that's incorrect: "Default arguments for a member function
of a class template shall be specified on the initial declaration of the member
function within the class template."

$ cat a.cc
template
class K
{
  int fn(int, int);
};

template
int K::fn (int a, int b = 3)
{
  return a - b;
}

$ g++ -c a.cc

$ clang++ -c a.cc
a.cc:8:26: error: default arguments cannot be added to an out-of-line
definition  of a member of a class template
int K::fn (int a, int b = 3)
 ^   ~
1 error generated.

$ g++ --version
g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.This is free software; see the
source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ clang++ --version
Ubuntu clang version 3.0-6ubuntu3 (tags/RELEASE_30/final) (based on LLVM
3.0)Target: x86_64-pc-linux-gnu
Thread model: posix


[Bug regression/54374] analysis for "may be used uninitialized" degraded...

2012-09-04 Thread gbburkhardt at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54374

--- Comment #3 from Glenn Burkhardt  2012-09-04 
21:40:55 UTC ---
I'd be more convinced about 'works for me' if I could see the full version
number of the compiler.  I've just double checked that the files I uploaded are
correct, and tried it with gcc 4.6.1 and 4.6.3, with the same result.  -m32 or
-m64 doesn't matter.


[Bug bootstrap/54128] [4.8 Regression] GCC does not bootstrap on little endian mips due to mis-compare on tree-data-ref.c

2012-09-04 Thread sje at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54128

--- Comment #12 from Steve Ellcey  2012-09-04 21:46:55 
UTC ---
Proposed patch has been posted to gcc-patches:

http://gcc.gnu.org/ml/gcc-patches/2012-08/msg02089.html

Use NONDEBUG_INSN_P instead of INSN_P in build_insn_chain.


[Bug ada/54469] FAIL: gnat.dg/array11.adb (test for warnings, line 12)

2012-09-04 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54469

--- Comment #4 from Dominique d'Humieres  2012-09-04 
21:54:56 UTC ---
For the record, this was started with the patch submitted at
http://gcc.gnu.org/ml/gcc-patches/2012-04/msg01456.html. From the Ada failures
reported at http://gcc.gnu.org/ml/gcc-patches/2012-04/msg01468.html, only the
failures 

FAIL: gnat.dg/array11.adb  (test for warnings, line 12)
FAIL: gnat.dg/object_overflow.adb  (test for warnings, line 8)

are surviving on x86_64-apple-darwin10.


[Bug c++/54420] [4.6/4.7/4.8 Regression] Segmentation fault in decl_mangling_context

2012-09-04 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54420

Jason Merrill  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org

--- Comment #2 from Jason Merrill  2012-09-04 
22:16:57 UTC ---
The name __lambda, like all names beginning with "__", is reserved to the
implementation.

In addition, some identifiers are reserved for use by C++ implementations and
standard libraries (17.6.4.3.2) and shall not be used otherwise; no diagnostic
is required.

— Each name that contains a double underscore _ _ or begins with an underscore
followed by an uppercase letter (2.12) is reserved to the implementation for
any use.

I'll fix 4.8 to avoid crashing on this testcase, but I don't want to change the
release branches.


[Bug other/54398] Incorrect ARM assembly when building with -fno-omit-frame-pointer -O2

2012-09-04 Thread asharif at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54398

asharif at gcc dot gnu.org changed:

   What|Removed |Added

  Attachment #28096|0   |1
is obsolete||

--- Comment #2 from asharif at gcc dot gnu.org 2012-09-04 22:47:15 UTC ---
Created attachment 28131
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28131
Repro case


[Bug other/54398] Incorrect ARM assembly when building with -fno-omit-frame-pointer -O2

2012-09-04 Thread asharif at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54398

--- Comment #3 from asharif at gcc dot gnu.org 2012-09-04 22:48:51 UTC ---
Sorry about that.

Attached is a preprocessed file that reproduces the bug.

gcc version: gcc-4.6.4 at 19788:190734 (as reported by svnversion -c)
system type: arm linux
configured as: configure --disable-multilib --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/armv7a-cros-linux-gnueabi/gcc-bin/4.6.4
--datadir=/usr/share/gcc-data/armv7a-cros-linux-gnueabi/4.6.4
--mandir=/usr/share/gcc-data/armv7a-cros-linux-gnueabi/4.6.4/man
--infodir=/usr/share/gcc-data/armv7a-cros-linux-gnueabi/4.6.4/info
--includedir=/usr/lib/gcc/armv7a-cros-linux-gnueabi/4.6.4/include
--with-gxx-include-dir=/usr/lib/gcc/armv7a-cros-linux-gnueabi/4.6.4/include/g++-v4
--host=x86_64-pc-linux-gnu --target=armv7a-cros-linux-gnueabi
--build=x86_64-pc-linux-gnu --enable-languages=c,c++ --with-float=hard
--with-mode=thumb --with-sysroot=/usr/armv7a-cros-linux-gnueabi
--disable-libmudflap --disable-libssp --enable-libgomp --enable-__cxa_atexit
--enable-checking=release --disable-libquadmath --with-arch=armv7-a
--disable-esp --enable-linker-build-id
command line: armv7a-cros-linux-gnueabi-g++ -fno-exceptions
-Wno-unused-parameter -Wno-missing-field-initializers -D_FILE_OFFSET_BITS=64
-fvisibility=hidden -pipe -fPIC -fno-strict-aliasing -g -mthumb
-Wa,-mimplicit-it=thumb -march=armv7-a -mtune=cortex-a8 -mfloat-abi=hard
-mfpu=neon -O2 -fno-ident -fdata-sections -ffunction-sections -fno-rtti
-fno-threadsafe-statics -fvisibility-inlines-hidden -Wsign-compare
-Wno-invalid-offsetof -Wno-multichar -Wno-sign-compare -Wno-abi -O2 -pipe
-march=armv7-a -mtune=cortex-a15 -mfpu=neon -mfloat-abi=hard -g
-fno-omit-frame-pointer -o reduced.out reduced.ii
# There is no compiler output
# When I run this on an ARM box, I get this output from the binary:

p1.x 0
p1.y 0
p2.x 5
p2.y 5
p3.x 10
p3.y 10
p1.x 4
p1.y 4
p2.x 762508 # This is 7 with -fomit-frame-pointer
p2.y 7
p3.x 10
p3.y 10
p1.x 0
p1.y 0
p2.x 569140 # this is 2 with -fomit-frame-pointer
p2.y 0
p3.x 4
p3.y 4


[Bug c/54303] -fdata-sections -ffunction-sections and -fmerge-constants do not work well together

2012-09-04 Thread ramana at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54303

--- Comment #6 from Ramana Radhakrishnan  2012-09-04 
23:06:29 UTC ---
Oh I see, my bad to have missed your command line. Sorry.  

I see what's going on here. It's just luck that this works on x86_64 with your
invocation. 


>$ objdump -h non-collected-strings.o  | grep str
>non-collected-strings.o: file format elf64-x86-64
>  3 .rodata.str1.8 001f      0040  2**3
>  5 .rodata.str1.1 001b      006f  2**0

Try with -Os on x86_64 and it should fail there as well on trunk / earlier
versions of GCC. 

Notice one string has an alignment of 8 and the other 1 and that's what drew my
attention to the funniness in this testcase.

The reason for this is the play with CONSTANT_ALIGNMENT in the backends. If the
strings gets the same alignment you end up with the strings in the same
sections which means the whole thing doesn't work and if they have a different
alignment as with your invocation, it all works fine. :(


regards,
ramana


[Bug lto/53572] Some public symbols don't get to serialized LTO

2012-09-04 Thread matt at use dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53572

Matt Hargett  changed:

   What|Removed |Added

 CC||matt at use dot net

--- Comment #11 from Matt Hargett  2012-09-04 23:48:40 UTC 
---
Applying this patch to my 4.7 branch checkout fixes my problem, which had the
same symptoms. Can someone please commit this to the 4.7 branch?

===
--- ../google-gcc-4_7/gcc/cgraph.h(revision 190939)
+++ ../google-gcc-4_7/gcc/cgraph.h(working copy)
@@ -1004,10 +1004,16 @@
 static inline bool
 varpool_can_remove_if_no_refs (struct varpool_node *node)
 {
-  return (!node->force_output && !node->used_from_other_partition
+  if (DECL_EXTERNAL (node->decl))
+ return true;
+ 
+   return (!node->force_output && !node->used_from_other_partition
   && (flag_toplevel_reorder || DECL_COMDAT (node->decl)
   || DECL_ARTIFICIAL (node->decl))
-&& (DECL_COMDAT (node->decl) || !node->externally_visible));
+&& ((DECL_COMDAT (node->decl) 
+&& !varpool_used_from_object_file_p (node))
+  || !node->externally_visible
+  || DECL_HAS_VALUE_EXPR_P (node->decl)));
 }


[Bug c/54486] New: Spurious printf format warning mentions nonexistent type 'sizetype'

2012-09-04 Thread Keith.S.Thompson at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54486

 Bug #: 54486
   Summary: Spurious printf format warning mentions nonexistent
type 'sizetype'
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: keith.s.thomp...@gmail.com


printf's "%zu" format expects an argument of type size_t.  In the sample
program, the corresponding argument is of type size_t in all the printf calls
(the first because strspn() is defined to return a size_t result, and the
second because of the explicit cast, and similarly for the others).

For a call to strlen() or to a user-defined function func(), gcc rightly does
not complain.

For a call to strspn(), even with an explicit cast, gcc incorrectly complains
that the arguments is of type ‘sizetype’ -- which, as far as I can tell,
doesn't exist.  (If I try to add a variable definition of type ‘sizetype’, I
get "error: unknown type name ‘sizetype’", and I can find no reference to
‘sizetype’ in any of my system's headers.)

I see nothing unusual in the declaration of strspn() in /usr/include/string.h.

$ uname -a 
Linux kvetch 3.2.0-29-generic-pae #46-Ubuntu SMP Fri Jul 27 17:25:43 UTC 2012
i686 i686 i386 GNU/Linux
$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.10
DISTRIB_CODENAME=quantal
DISTRIB_DESCRIPTION="Ubuntu quantal (development branch)"
$ gcc --version
gcc (Ubuntu/Linaro 4.7.0-7ubuntu3) 4.7.0
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ cat c.c
#include 
#include 

extern size_t func(void);

int main(void) {
printf("%zu\n", strspn("abc", "abcdefg")); /* line 7 */
printf("%zu\n", (size_t)strspn("abc", "abcdefg")); /* line 8 */
printf("%zu\n", strlen("foo"));
printf("%zu\n", (size_t)strlen("foo"));
printf("%zu\n", func());
printf("%zu\n", (size_t)func());
return 0;   
}   
$ gcc -c -std=c99 -pedantic c.c
c.c: In function ‘main’:
c.c:7:5: warning: format ‘%zu’ expects argument of type ‘size_t’, but argument
2 has type ‘sizetype’ [-Wformat]
c.c:8:5: warning: format ‘%zu’ expects argument of type ‘size_t’, but argument
2 has type ‘sizetype’ [-Wformat]
$


[Bug c++/54420] [4.6/4.7/4.8 Regression] Segmentation fault in decl_mangling_context

2012-09-04 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54420

--- Comment #3 from Jason Merrill  2012-09-05 
04:17:09 UTC ---
Author: jason
Date: Wed Sep  5 04:16:58 2012
New Revision: 190961

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190961
Log:
PR c++/54420
* cp-tree.h (LAMBDANAME_P): Remove.
(LAMBDA_TYPE_P): Check CLASSTYPE_LAMBDA_EXPR instead.
* cp-lang.c (cxx_dwarf_name): Likewise.
* error.c (dump_aggr_type): Likewise.
* semantics.c (begin_lambda_type): Set CLASSTYPE_LAMBDA_EXPR sooner.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-intname.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-lang.c
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/error.c
trunk/gcc/cp/name-lookup.c
trunk/gcc/cp/semantics.c
trunk/gcc/testsuite/ChangeLog


[Bug c++/54441] [4.7/4.8 Regression] Infinite loop with brace initializer on zero-length array

2012-09-04 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54441

--- Comment #2 from Jason Merrill  2012-09-05 
04:17:19 UTC ---
Author: jason
Date: Wed Sep  5 04:17:12 2012
New Revision: 190962

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190962
Log:
PR c++/54441
* decl.c (reshape_init_class): Handle invalid initializer for
0-length array member.

* error.c (dump_type_suffix): Correct handling of 0-length arrays.

Added:
trunk/gcc/testsuite/g++.dg/ext/flexary3.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/cp/error.c
trunk/gcc/testsuite/ChangeLog


[Bug c++/54441] [4.7/4.8 Regression] Infinite loop with brace initializer on zero-length array

2012-09-04 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54441

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||jason at gcc dot gnu.org
 Resolution||FIXED

--- Comment #3 from Jason Merrill  2012-09-05 
04:20:28 UTC ---
Fixed.


[Bug c++/54420] [4.6/4.7/4.8 Regression] Segmentation fault in decl_mangling_context

2012-09-04 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54420

Jason Merrill  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED

--- Comment #4 from Jason Merrill  2012-09-05 
04:20:53 UTC ---
Fixed.


[Bug c/54486] Spurious printf format warning mentions nonexistent type 'sizetype'

2012-09-04 Thread polacek at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54486

Marek Polacek  changed:

   What|Removed |Added

 CC||polacek at redhat dot com

--- Comment #1 from Marek Polacek  2012-09-05 
06:04:58 UTC ---
It is also needed to use -Wall.  Both arguments to strspn () are constants, so
in this case the __builtin_strspn () is used.  You shouldn't see this warning
with -fno-builtin-strspn.  Thus  is correct in this regard.

GCC 4.[1-5] are without warnings, with 4.6 I get:
/home/marek/rh/tests/pr54486.c: In function ‘main’:
/home/marek/rh/tests/pr54486.c:7:5: warning: format ‘%zu’ expects argument of
type ‘size_t’, but argument 2 has type ‘long unsigned int’ [-Wformat]
/home/marek/rh/tests/pr54486.c:8:5: warning: format ‘%zu’ expects argument of
type ‘size_t’, but argument 2 has type ‘long unsigned int’ [-Wformat]

with 4.7/trunk:
/home/marek/rh/tests/pr54486.c: In function ‘main’:
/home/marek/rh/tests/pr54486.c:7:5: warning: format ‘%zu’ expects argument of
type ‘size_t’, but argument 2 has type ‘sizetype’ [-Wformat]
/home/marek/rh/tests/pr54486.c:8:5: warning: format ‘%zu’ expects argument of
type ‘size_t’, but argument 2 has type ‘sizetype’ [-Wformat


[Bug bootstrap/54484] r190927 breaks bootstrap with clang compiler

2012-09-04 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54484

--- Comment #4 from Marc Glisse  2012-09-05 06:12:20 
UTC ---
Diego,

did you also take a look at the warning about lessthan_ in the clang messages?


[Bug c/54486] Spurious printf format warning mentions nonexistent type 'sizetype'

2012-09-04 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54486

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||diagnostic
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-09-05
 Ever Confirmed|0   |1

--- Comment #2 from Andrew Pinski  2012-09-05 
06:13:29 UTC ---
Confirmed.
Here is a shorter testcase that explicitly uses the builtins:
#include 

int main(void) {
__builtin_printf("%zu\n", __builtin_strspn("abc", "abcdefg")); /*
line 7 */
__builtin_printf("%zu\n", (size_t)__builtin_strspn("abc", "abcdefg")); /*
line 8 */
__builtin_printf("%zu\n", __builtin_strlen("abc")); /* line 9 */
return 0;   
}


[Bug c/54486] Spurious printf format warning mentions nonexistent type 'sizetype'

2012-09-04 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54486

Jakub Jelinek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||jakub at gcc dot gnu.org
 AssignedTo|unassigned at gcc dot   |jakub at gcc dot gnu.org
   |gnu.org |
   Target Milestone|--- |4.8.0