[Bug fortran/55603] Memory leak in intrinsic assignment of allocatable derived type function result

2012-12-05 Thread janus at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55603



janus at gcc dot gnu.org changed:



   What|Removed |Added



 CC||janus at gcc dot gnu.org



--- Comment #1 from janus at gcc dot gnu.org 2012-12-05 08:26:19 UTC ---

The problem seems to be that we fail to do auto-deallocation of the function

result (after the assignment). One should check the standard, if and where this

is actually demanded.



Btw, this will also be important for the future FINAL implementation.


[Bug c++/55311] Cannot specialize template parameter of type 'const char *const' in 'using' alias

2012-12-05 Thread niels at penneman dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55311



--- Comment #2 from Niels Penneman niels at penneman dot org 2012-12-05 
08:32:42 UTC ---

Workaround for GCC 4.8.0-alpha20121202 (full version details see earlier post)

for case #2: replace STRING_PTR template parameter with static_castconst char

*const(STRING_PTR).



Example code below with same invocation arguments is accepted by the compiler.



===



extern constexpr char STRING_PTR[] = test;



template const char *const C, typename T

struct A {};



template typename T

struct B: Astatic_castconst char *const(STRING_PTR), T {};



===



This workaround does not work for case #1 (with 'using') and does not seem to

work on 4.7.2 in general.


[Bug libgcc/55589] Failure compiling generic-morestack-thread.c, without threads

2012-12-05 Thread michael at talamasca dot ocis.net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55589



--- Comment #2 from michael at talamasca dot ocis.net michael at talamasca dot 
ocis.net 2012-12-05 08:38:49 UTC ---

My usual GCC recipe is this:



configure

--build=i386-pc-linux-uclibc

--prefix=/usr

--sysconfdir=/etc

--sharedstatedir=/var/com

--localstatedir=/var/state

--infodir=/usr/share/info

--mandir=/usr/share/man

--disable-nls

--disable-static

--enable-shared

--enable-languages=c,c++

--disable-threads

--disable-libgomp

--disable-libitm

--with-system-zlib

--enable-frame-pointer



Everything up to --enable-shared is my usual policy that I apply to every

autoconf application unless it causes a problem.


[Bug lto/55525] ICE: tree check: expected array_type, have pointer_type in array_ref_low_bound, at expr.c:6768

2012-12-05 Thread rguenth at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55525



--- Comment #4 from Richard Biener rguenth at gcc dot gnu.org 2012-12-05 
08:47:45 UTC ---

Author: rguenth

Date: Wed Dec  5 08:47:40 2012

New Revision: 194183



URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=194183

Log:

2012-12-05  Richard Biener  rguent...@suse.de



PR lto/55525

* gimple-streamer-in.c (input_gimple_stmt): Fixup ARRAY_REFs as well.



* gcc.dg/lto/pr55525_0.c: New testcase.

* gcc.dg/lto/pr55525_1.c: Likewise.



Added:

trunk/gcc/testsuite/gcc.dg/lto/pr55525_0.c

trunk/gcc/testsuite/gcc.dg/lto/pr55525_1.c

Modified:

trunk/gcc/ChangeLog

trunk/gcc/gimple-streamer-in.c

trunk/gcc/testsuite/ChangeLog


[Bug libfortran/55601] libgfortran build fails with --disable-libquadmath

2012-12-05 Thread burnus at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55601



Tobias Burnus burnus at gcc dot gnu.org changed:



   What|Removed |Added



 CC||burnus at gcc dot gnu.org



--- Comment #1 from Tobias Burnus burnus at gcc dot gnu.org 2012-12-05 
08:52:25 UTC ---

If you don't want libgfortran to use libquadmath, you should also disable the

READ(16) support in the frontend by configuring with:



  --disable-libquadmath-support





I think the proper solution for this PR is to add a libgfortran configure check

which fails with:



  Cannot find libquadmath but the compiler has been compiled with REAL(16)

   support. Ensure that libquadmath is available or configure GCC with

   --disable-libquadmath-support


[Bug fortran/37336] Fortran 2003: Finish derived-type finalization

2012-12-05 Thread janus at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336



janus at gcc dot gnu.org changed:



   What|Removed |Added



 Depends on||55207, 55603



--- Comment #18 from janus at gcc dot gnu.org 2012-12-05 08:54:01 UTC ---

Adding two auto-dealloc bugs, which need to be fixed in order to get correct

finalization calls.


[Bug middle-end/51233] [ipa-iterations] running multiple passes of early IPA on zlib produces more optimal code

2012-12-05 Thread richard.guenther at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51233



--- Comment #6 from richard.guenther at gmail dot com richard.guenther at 
gmail dot com 2012-12-05 09:23:56 UTC ---

On Tue, Dec 4, 2012 at 9:35 PM, matt at use dot net

gcc-bugzi...@gcc.gnu.org wrote:



 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51233



 --- Comment #5 from Matt Hargett matt at use dot net 2012-12-04 20:35:09 
 UTC ---

 ping? if you're more comfortable with relegating multiple passes to LTO, I

 think that's a good starting point. we can wait for a per-unit C++ template

 case to come up after that's in.



Yes, multiple LTO passes is what I think should be done (or alternatively

if one really dislikes this better processing of cgraph SCCs during early

optimizations like I outlined in some e-mail response to the original

patches).  But the LTO approach should be more powerful anyway.



 is there anything you'd like me to do to get this moving again?



Produce patches for review?



;)


[Bug fortran/55534] -Wno-missing-include-dirs does not work with gfortran

2012-12-05 Thread burnus at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55534



Tobias Burnus burnus at gcc dot gnu.org changed:



   What|Removed |Added



 CC||burnus at gcc dot gnu.org,

   ||tkoenig at gcc dot gnu.org



--- Comment #2 from Tobias Burnus burnus at gcc dot gnu.org 2012-12-05 
09:29:08 UTC ---

(See PR 54033 for the patch which originally added this feature.)



Untested patch.



--- a/gcc/fortran/cpp.c

+++ b/gcc/fortran/cpp.c

@@ -471,2 +471,3 @@ gfc_cpp_post_options (void)

   cpp_option-preprocessed = gfc_option.flag_preprocessed;

+  cpp_option-warn_missing_include_dirs =

gfc_option.warn_missing_include_dirs;



diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h

index bf767b2..6f3515f 100644

--- a/gcc/fortran/gfortran.h

+++ b/gcc/fortran/gfortran.h

@@ -2236,2 +2236,3 @@ typedef struct

   int warn_target_lifetime;

+  int warn_missing_include_dirs;

   int max_errors;

diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c

index e05b935..489d1ff 100644

--- a/gcc/fortran/options.c

+++ b/gcc/fortran/options.c

@@ -117,2 +117,3 @@ gfc_init_options (unsigned int decoded_options_count,

   gfc_option.warn_target_lifetime = 0;

+  gfc_option.warn_missing_include_dirs = 0;

   gfc_option.max_errors = 25;

@@ -478,2 +485,3 @@ set_Wall (int setting)

   gfc_option.warn_target_lifetime = setting;

+  gfc_option.warn_missing_include_dirs = setting;



@@ -686,2 +694,6 @@ gfc_handle_option (size_t scode, const char *arg, int

value,



+case OPT_Wmissing_include_dirs:

+  gfc_option.warn_missing_include_dirs = value;

+  break;

+

 case OPT_Wrealloc_lhs:

diff --git a/gcc/fortran/scanner.c b/gcc/fortran/scanner.c

index 765c0f9..2bdd87f 100644

--- a/gcc/fortran/scanner.c

+++ b/gcc/fortran/scanner.c

@@ -327,4 +327,3 @@ add_path_to_list (gfc_directorylist **list, const char

*path,

{

- /* FIXME:  Also support -Wmissing-include-dirs.  */

- if (warn)

+ if (warn  gfc_option.warn_missing_include_dirs)

gfc_warning_now (Nonexistent include directory \%s\, path);


[Bug lto/55525] ICE: tree check: expected array_type, have pointer_type in array_ref_low_bound, at expr.c:6768

2012-12-05 Thread rguenth at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55525



Richard Biener rguenth at gcc dot gnu.org changed:



   What|Removed |Added



 Status|ASSIGNED|RESOLVED

 Resolution||FIXED

   Target Milestone|--- |4.8.0



--- Comment #5 from Richard Biener rguenth at gcc dot gnu.org 2012-12-05 
09:32:46 UTC ---

Fixed on trunk.


[Bug tree-optimization/35272] Loop distribution fails to distribute

2012-12-05 Thread rguenth at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35272



Richard Biener rguenth at gcc dot gnu.org changed:



   What|Removed |Added



 Status|UNCONFIRMED |NEW

   Last reconfirmed||2012-12-05

 Ever Confirmed|0   |1



--- Comment #1 from Richard Biener rguenth at gcc dot gnu.org 2012-12-05 
09:45:24 UTC ---

On trunk we would distribute a variant with a[i] = c[i] ... if the partitions

would not be fused because of having similar memory accesses.  With the

reduction in place we only form a single useful partition because of the

dependences.



Thus, confirmed (we can build the RDG now), for



  _5 = a[i_19];

  _6 = c[i_19];

  _7 = d[i_19];

  _8 = _6 * _7;

  _9 = _5 + _8;

  a[i_19] = _9;

  _11 = _7 + _9;

  _12 = i_19 + -1;

  _13 = b[_12];

  _14 = _11 + _13;

  b[i_19] = _14;



we'd have to use a[i_19] in the loop storing to b but instead we

only try re-compute it via retaining



  _5 = a[i_19];

  _6 = c[i_19];

  _7 = d[i_19];

  _8 = _6 * _7;

  _9 = _5 + _8;



which of course does not work (a[i_19] is not available).


[Bug middle-end/38277] gcc.c-torture/execute/20010910-1.c wrong code generation by loop distribution enabled

2012-12-05 Thread rguenth at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38277



Richard Biener rguenth at gcc dot gnu.org changed:



   What|Removed |Added



 Status|UNCONFIRMED |RESOLVED

 Resolution||FIXED



--- Comment #2 from Richard Biener rguenth at gcc dot gnu.org 2012-12-05 
09:47:41 UTC ---

Fixed.


[Bug tree-optimization/43234] ICE with per-function -ftree-loop-distribution (via attribute optimize or pragma)

2012-12-05 Thread rguenth at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43234



Richard Biener rguenth at gcc dot gnu.org changed:



   What|Removed |Added



 Status|UNCONFIRMED |RESOLVED

 Resolution||FIXED

  Known to fail||



--- Comment #4 from Richard Biener rguenth at gcc dot gnu.org 2012-12-05 
09:49:09 UTC ---

Works with 4.5+.


[Bug tree-optimization/35272] Loop distribution fails to distribute

2012-12-05 Thread rguenth at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35272



Richard Biener rguenth at gcc dot gnu.org changed:



   What|Removed |Added



 CC||changpeng.fang at amd dot

   ||com



--- Comment #2 from Richard Biener rguenth at gcc dot gnu.org 2012-12-05 
09:51:09 UTC ---

*** Bug 43428 has been marked as a duplicate of this bug. ***


[Bug tree-optimization/43428] vectorizer should invoke loop distribution to partially vectorize this loop

2012-12-05 Thread rguenth at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43428



Richard Biener rguenth at gcc dot gnu.org changed:



   What|Removed |Added



 Status|NEW |RESOLVED

 Resolution||DUPLICATE



--- Comment #3 from Richard Biener rguenth at gcc dot gnu.org 2012-12-05 
09:51:09 UTC ---

Duplicate of 35272.



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


[Bug tree-optimization/50222] ICE with -O{1,2} -funswitch-loops -ftree-loop-distribution

2012-12-05 Thread rguenth at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50222



--- Comment #4 from Richard Biener rguenth at gcc dot gnu.org 2012-12-05 
09:59:11 UTC ---

Author: rguenth

Date: Wed Dec  5 09:59:08 2012

New Revision: 194188



URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=194188

Log:

2012-12-05  Richard Biener  rguent...@suse.de



PR tree-optimization/50222

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



Added:

trunk/gcc/testsuite/gcc.dg/torture/pr50222.c

Modified:

trunk/gcc/testsuite/ChangeLog


[Bug fortran/55603] Memory leak in intrinsic assignment of a scalar allocatable function result

2012-12-05 Thread burnus at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55603



Tobias Burnus burnus at gcc dot gnu.org changed:



   What|Removed |Added



   Keywords||wrong-code

 Status|UNCONFIRMED |NEW

   Last reconfirmed||2012-12-05

 CC||burnus at gcc dot gnu.org

Summary|Memory leak in intrinsic|Memory leak in intrinsic

   |assignment of allocatable   |assignment of a scalar

   |derived type function   |allocatable function result

   |result  |

 Ever Confirmed|0   |1



--- Comment #2 from Tobias Burnus burnus at gcc dot gnu.org 2012-12-05 
10:00:09 UTC ---

The issue seems to only occur with scalars.



Generated code



  a = *bar ();



Expected: One uses a temporary as in



  tmp = bar ();

  a = *tmp;

  free (tmp);



The same issue occurs with reallocate LHS, were also a temporary should be

used.



[Check that the allocation/freeing is properly done for variables with length

type parameter (currently only deferred-length CHARACTER strings).]


[Bug tree-optimization/50222] ICE with -O{1,2} -funswitch-loops -ftree-loop-distribution

2012-12-05 Thread rguenth at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50222



Richard Biener rguenth at gcc dot gnu.org changed:



   What|Removed |Added



 Status|NEW |RESOLVED

  Known to work||4.7.2, 4.8.0

 Resolution||FIXED

   Target Milestone|--- |4.7.2



--- Comment #5 from Richard Biener rguenth at gcc dot gnu.org 2012-12-05 
10:08:53 UTC ---

Fixed for 4.7 and trunk.


[Bug c++/51810] internal compiler error

2012-12-05 Thread paolo.carlini at oracle dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51810



Paolo Carlini paolo.carlini at oracle dot com changed:



   What|Removed |Added



 Status|NEW |RESOLVED

 Resolution||WORKSFORME



--- Comment #8 from Paolo Carlini paolo.carlini at oracle dot com 2012-12-05 
10:09:51 UTC ---

Ok, thanks, closing.


[Bug tree-optimization/51238] ICE: SIGSEGV in find_uses_to_rename_use (tree-ssa-loop-manip.c:1267) with -Os -ftree-loop-distribution

2012-12-05 Thread rguenth at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51238



--- Comment #2 from Richard Biener rguenth at gcc dot gnu.org 2012-12-05 
10:12:56 UTC ---

Author: rguenth

Date: Wed Dec  5 10:12:53 2012

New Revision: 194192



URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=194192

Log:

2012-12-05  Richard Biener  rguent...@suse.de



PR tree-optimization/51238

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



Added:

trunk/gcc/testsuite/gcc.dg/torture/pr51238.c

Modified:

trunk/gcc/testsuite/ChangeLog


[Bug tree-optimization/51238] ICE: SIGSEGV in find_uses_to_rename_use (tree-ssa-loop-manip.c:1267) with -Os -ftree-loop-distribution

2012-12-05 Thread rguenth at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51238



Richard Biener rguenth at gcc dot gnu.org changed:



   What|Removed |Added



 Status|UNCONFIRMED |RESOLVED

  Known to work||4.8.0

 Resolution||FIXED

   Target Milestone|--- |4.8.0



--- Comment #3 from Richard Biener rguenth at gcc dot gnu.org 2012-12-05 
10:13:42 UTC ---

Fixed on trunk.


[Bug fortran/55603] Memory leak in intrinsic assignment of a scalar allocatable function result

2012-12-05 Thread burnus at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55603



--- Comment #3 from Tobias Burnus burnus at gcc dot gnu.org 2012-12-05 
10:14:03 UTC ---

(In reply to comment #1)

 The problem seems to be that we fail to do auto-deallocation of the function

 result (after the assignment). One should check the standard, if and where 
 this

 is actually demanded.



Nowhere. It only falls into the category quality of implementation. But a

reasonable place would be after the place where finalization would occur.





 Btw, this will also be important for the future FINAL implementation.



Yes, after the function has evaluated, its result has to be finalized. I think

it should be as following:



tmp = bar();

final_wrapper (a);  ! must be after bar()

a = *tmp;

final_wrapper (*tmp);

free (tmp);



With an allocatable LHS it gets messier due to the length type parameter (and

shape). In addition, it seems as if one had always to finalize the LHS in an

intrinsic assignment while the (re)allocation is only allowed if the shape

doesn't match.





From F2008, 4.5.6.3 When finalization occurs:



If an executable construct references a function, the result is finalized

after execution of the innermost executable construct containing the

reference.



When an intrinsic assignment statement is executed, the variable is finalized

after evaluation of expr and before the definition of the variable.





By the way, the latter implies that a temporary variable has to be used if

there is a finalizer and the RHS doesn't return a pointer/allocatable.

Otherwise one had to finalize the LHS before evaluating the RHS expr.


[Bug tree-optimization/55600] excessive size of vectorized code

2012-12-05 Thread rguenth at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55600



--- Comment #1 from Richard Biener rguenth at gcc dot gnu.org 2012-12-05 
10:33:06 UTC ---

GCC fully unrolls the vectorized looo.  ICC does not.



The loop rolls 16 times:



  bb 3:

  # vect_p.5_30 = PHI vect_p.5_45(4), vect_p.8_31(2)

  # vect_su.12_52 = PHI vect_su.12_53(4), { 0, 0, 0, 0 }(2)

  # ivtmp_61 = PHI ivtmp_62(4), 0(2)

  vect_var_.9_46 = MEM[(int *)vect_p.5_30];

  vect_p.5_47 = vect_p.5_30 + 16;

  vect_var_.10_48 = MEM[(int *)vect_p.5_47];

  vect_perm_even_49 = VEC_PERM_EXPR vect_var_.9_46, vect_var_.10_48, { 0, 2,

4, 6 };

  vect_perm_odd_50 = VEC_PERM_EXPR vect_var_.9_46, vect_var_.10_48, { 1, 3, 5,

7 };

  vect_var_.11_51 = vect_perm_even_49 * vect_perm_odd_50;

  vect_su.12_53 = vect_var_.11_51 + vect_su.12_52;

  vect_p.5_45 = vect_p.5_47 + 16;

  ivtmp_62 = ivtmp_61 + 1;

  if (ivtmp_62  16)

goto bb 4;

  else

goto bb 5;



  bb 4:

  goto bb 3;



but at -O3 we don't care too much about code size in this case.  So I'm not

sure you can call this a bug.  Does it run slower?


[Bug middle-end/55597] [4.8 Regression] internal compiler error: in plus_constant, at explow.c:88

2012-12-05 Thread ebotcazou at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55597



Eric Botcazou ebotcazou at gcc dot gnu.org changed:



   What|Removed |Added



 CC||ebotcazou at gcc dot

   ||gnu.org



--- Comment #6 from Eric Botcazou ebotcazou at gcc dot gnu.org 2012-12-05 
11:34:33 UTC ---

 Out of expand GCC produces:

 

 (insn 6 5 7 2 (set (reg:DI 61)

 (reg:DI 0 ax)) t.c:8 -1

  (expr_list:REG_EQUAL (symbol_ref:SI (__morestack_initial_sp) \

[flags 0x10]  var_decl 0x76263720 __morestack_initial_sp)

 (nil)))

 (insn 7 6 8 2 (parallel [

 (set (reg:DI 62)

 (plus:DI (reg:DI 61)

 (const_int 4 [0x4])))

 (clobber (reg:CC 17 flags))

 ]) t.c:8 -1

  (nil))



The REG_EQUAL note is already wrong here.


[Bug c++/52311] implicitly_declare_fn: valgrind problem

2012-12-05 Thread paolo.carlini at oracle dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52311



Paolo Carlini paolo.carlini at oracle dot com changed:



   What|Removed |Added



 Status|NEW |RESOLVED

 Resolution||DUPLICATE



--- Comment #3 from Paolo Carlini paolo.carlini at oracle dot com 2012-12-05 
11:42:05 UTC ---

Dup.



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


[Bug c++/55418] Valgrind: Conditional jump or move depends on uninitialised value(s) in implicitly_declare_fn() method.c:1623

2012-12-05 Thread paolo.carlini at oracle dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55418



Paolo Carlini paolo.carlini at oracle dot com changed:



   What|Removed |Added



 CC||dcb314 at hotmail dot com



--- Comment #6 from Paolo Carlini paolo.carlini at oracle dot com 2012-12-05 
11:42:05 UTC ---

*** Bug 52311 has been marked as a duplicate of this bug. ***


[Bug rtl-optimization/55598] LRA on powerpc does not like assembler in libgcc

2012-12-05 Thread steven at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55598



--- Comment #1 from Steven Bosscher steven at gcc dot gnu.org 2012-12-05 
11:44:18 UTC ---

Vlad committed a set of powerpc fixes here:

http://gcc.gnu.org/ml/gcc-patches/2012-12/msg00272.html



Perhaps you can try the patch, see if it helps?


[Bug rtl-optimization/55006] [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526

2012-12-05 Thread krebbel at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55006



--- Comment #9 from Andreas Krebbel krebbel at gcc dot gnu.org 2012-12-05 
11:54:11 UTC ---

Created attachment 28879

  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28879

Reduced testcase


[Bug rtl-optimization/55006] [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526

2012-12-05 Thread krebbel at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55006



Andreas Krebbel krebbel at gcc dot gnu.org changed:



   What|Removed |Added



 CC||krebbel at gcc dot gnu.org



--- Comment #10 from Andreas Krebbel krebbel at gcc dot gnu.org 2012-12-05 
11:56:03 UTC ---

The attached testcase gets miscompiled starting with that revision.



cc1  -fpreprocessed -quiet  -O2 -march=z196 -funroll-loops  t.c 



Perl_lex_start:

.LFB0:

stgrl%r2,PL_linestr

tm13(%r2),128

stmg%r14,%r15,112(%r15)

.LCFI0:

lay%r15,-168(%r15)

.LCFI1:

jne.L6

l%r0,12-- broken (access to absolute address 12)

lgrl%r2,PL_linestr

.L2:

tmlh%r0,4

jne.L1

la%r3,160(%r15)

lghi%r4,2

brasl%r14,Perl_sv_2pv_flags

.L1:

lmg%r14,%r15,280(%r15)

.LCFI2:

br%r14

.L6:

.LCFI3:

brasl%r14,Perl_sv_2mortal

stgrl%r2,PL_linestr

l%r0,12(%r2)

j.L2


[Bug rtl-optimization/55006] [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526

2012-12-05 Thread krebbel at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55006



--- Comment #11 from Andreas Krebbel krebbel at gcc dot gnu.org 2012-12-05 
11:58:25 UTC ---

Created attachment 28880

  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28880

web output r192525


[Bug rtl-optimization/55006] [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526

2012-12-05 Thread krebbel at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55006



--- Comment #12 from Andreas Krebbel krebbel at gcc dot gnu.org 2012-12-05 
11:58:53 UTC ---

Created attachment 28881

  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28881

web output r192526


[Bug rtl-optimization/55006] [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526

2012-12-05 Thread steven at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55006



--- Comment #13 from Steven Bosscher steven at gcc dot gnu.org 2012-12-05 
12:24:27 UTC ---

(In reply to comment #10)

 The attached testcase gets miscompiled starting with that revision.



And is not fixed after r194108?


[Bug rtl-optimization/55006] [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526

2012-12-05 Thread steven at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55006



--- Comment #14 from Steven Bosscher steven at gcc dot gnu.org 2012-12-05 
12:32:24 UTC ---

Nothing new here, just yet another invalid REG_EQUAL note:



The webizer tries to split r51 in this insn:



;; basic block 4, loop depth 0, count 0, freq 7100, maybe hot

;;  prev block 3, next block 5, flags: (REACHABLE, RTL, MODIFIED)

;;  pred:   2 [71.0%]

;; bb 4 artificial_defs: { }

;; bb 4 artificial_uses: { u20(11){ }u21(15){ }u22(32){ }u23(34){ }}

;; lr  in11 [%r11] 15 [%r15] 32 [%ap] 34 [%fp] 55

;; lr  use   11 [%r11] 15 [%r15] 32 [%ap] 34 [%fp] 55

;; lr  def   48 50

;; live  in  11 [%r11] 15 [%r15] 32 [%ap] 34 [%fp] 55

;; live  gen 48 50

;; live  kill

(code_label 38 6 37 4 4  [1 uses])

(note 37 38 58 4 [bb 4] NOTE_INSN_BASIC_BLOCK)

(insn 58 37 5 4 (set (reg:SI 50 [ D.1400 ])

(reg:SI 55 [ D.1400 ])) 67 {*movsi_zarch}

 (expr_list:REG_EQUAL (mem:SI (plus:DI (reg/v/f:DI 51 [ line ])

(const_int 12 [0xc])) [4 line_4(D)-sv_flags+0 S4 A32])

(nil)))



Web oldreg=51 newreg=56

Updating insn 58 (51-56)



But r51 is not live on entry to bb4, and not defined in bb4 before insn58, so

it's a REG_EQUAL use of a dead register.



The sole DEF or r51 is a parameter load, and r55 is set almost immediately

after it:



(note 7 0 2 2 [bb 2] NOTE_INSN_BASIC_BLOCK)

(insn 2 7 3 2 (set (reg/v/f:DI 51 [ line ])

(reg:DI 2 %r2 [ line ])) t.c:25 63 {*movdi_64}

 (nil))

(note 3 2 9 2 NOTE_INSN_FUNCTION_BEG)

(insn 9 3 10 2 (set (mem/f/c:DI (symbol_ref:DI (PL_linestr) [flags 0x40] 

var_decl 0x3fff74f65f0 PL_linestr) [2 PL_linestr+0 S8 A64])

(reg/v/f:DI 51 [ line ])) t.c:28 63 {*movdi_64}

 (nil))

(insn 10 9 11 2 (set (reg:SI 55 [ D.1400 ])

(mem:SI (plus:DI (reg/v/f:DI 51 [ line ])

(const_int 12 [0xc])) [4 line_4(D)-sv_flags+0 S4 A32])) t.c:29

67 {*movsi_zarch}

 (nil))



r51 dies in in insn 10.


[Bug c++/52791] structure should always be returned by passing a hidden argument with ms_abi, x86_64

2012-12-05 Thread paolo.carlini at oracle dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52791



--- Comment #2 from Paolo Carlini paolo.carlini at oracle dot com 2012-12-05 
12:51:18 UTC ---

Kai, can you have a look? Should be target?


[Bug c++/52792] this pointer and return pointer are passed in wrong order when ms_abi is used (x86_64)

2012-12-05 Thread paolo.carlini at oracle dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52792



--- Comment #2 from Paolo Carlini paolo.carlini at oracle dot com 2012-12-05 
12:52:00 UTC ---

Likewise, Kai, please.


[Bug rtl-optimization/55006] [4.8 Regression] aermod.f90 is miscompiled with '-m64 -O2 -funroll-loops' after revision 192526

2012-12-05 Thread krebbel at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55006



--- Comment #15 from Andreas Krebbel krebbel at gcc dot gnu.org 2012-12-05 
12:55:41 UTC ---

(In reply to comment #13)

 (In reply to comment #10)

  The attached testcase gets miscompiled starting with that revision.

 

 And is not fixed after r194108?



Just tested with r194219 - works again. Thanks!


[Bug c++/54466] [C++11] Recursive Type Alias, Member Function Pointer, Segmentation Fault

2012-12-05 Thread paolo.carlini at oracle dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54466



Paolo Carlini paolo.carlini at oracle dot com changed:



   What|Removed |Added



 CC||mattipee at yahoo dot co.uk



--- Comment #15 from Paolo Carlini paolo.carlini at oracle dot com 2012-12-05 
13:05:34 UTC ---

*** Bug 53026 has been marked as a duplicate of this bug. ***


[Bug c++/53026] ICE with alias-declarations

2012-12-05 Thread paolo.carlini at oracle dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53026



Paolo Carlini paolo.carlini at oracle dot com changed:



   What|Removed |Added



 Status|NEW |RESOLVED

 CC|jason at gcc dot gnu.org|

 Resolution||DUPLICATE



--- Comment #5 from Paolo Carlini paolo.carlini at oracle dot com 2012-12-05 
13:05:34 UTC ---

Dup, already fixed.



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


[Bug c++/55578] Disabling warnings inside macro definition doesn't work

2012-12-05 Thread paolo.carlini at oracle dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55578



Paolo Carlini paolo.carlini at oracle dot com changed:



   What|Removed |Added



 CC|ruboam at gmail dot com |dodji at gcc dot gnu.org



--- Comment #1 from Paolo Carlini paolo.carlini at oracle dot com 2012-12-05 
13:07:38 UTC ---

Maybe Dodji can have a look.


[Bug c++/54259] [4.7 Regression] Regression in move construction for std::pair

2012-12-05 Thread paolo.carlini at oracle dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54259



Paolo Carlini paolo.carlini at oracle dot com changed:



   What|Removed |Added



 Status|UNCONFIRMED |RESOLVED

 Resolution||WONTFIX



--- Comment #6 from Paolo Carlini paolo.carlini at oracle dot com 2012-12-05 
13:18:34 UTC ---

Let's close this, we are not going to backport access control for SFINAE in the

branch and there are decent workarounds.


[Bug c++/55582] [C++11] Unable to define string user-defined literal without leading underscore.

2012-12-05 Thread 3dw4rd at verizon dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55582



--- Comment #2 from Ed Smith-Rowland 3dw4rd at verizon dot net 2012-12-05 
13:18:36 UTC ---

Created attachment 28882

  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28882

Patch



This patch lexes stringXYZ user-defined literals as *two* tokens if the

suffix starts with a letter unless the letter is a lower-case 's'.  i.e. don't

parse as a user-defined literal but as a sequence of string and macro unless

starts with lower case 's'.



The original code parsed all string literals not beginning with any letter as a

sequence of string and macro.


[Bug c++/55582] [C++11] Unable to define string user-defined literal without leading underscore.

2012-12-05 Thread paolo.carlini at oracle dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55582



--- Comment #3 from Paolo Carlini paolo.carlini at oracle dot com 2012-12-05 
13:23:24 UTC ---

Note that std::u16string and std::u32string aren't unconditionally available, I

think you need something like:



// { dg-require-effective-target stdint_types }


[Bug c++/55582] [C++11] Unable to define string user-defined literal without leading underscore.

2012-12-05 Thread 3dw4rd at verizon dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55582



Ed Smith-Rowland 3dw4rd at verizon dot net changed:



   What|Removed |Added



  Attachment #28882|0   |1

is obsolete||



--- Comment #4 from Ed Smith-Rowland 3dw4rd at verizon dot net 2012-12-05 
13:45:26 UTC ---

Created attachment 28883

  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28883

New patch adds dg-require-effective-target stdint_types to test.



Done.  Thanks.



Built and tested on x86_64-linux.


[Bug tree-optimization/55590] SRA still produces unnecessarily unaligned memory accesses

2012-12-05 Thread jamborm at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55590



Martin Jambor jamborm at gcc dot gnu.org changed:



   What|Removed |Added



URL||http://gcc.gnu.org/ml/gcc-p

   ||atches/2012-12/msg00237.htm

   ||l



--- Comment #1 from Martin Jambor jamborm at gcc dot gnu.org 2012-12-05 
15:17:29 UTC ---

I have submitted the patch to the mailing list:



http://gcc.gnu.org/ml/gcc-patches/2012-12/msg00237.html


[Bug debug/55541] [4.6/4.7/4.8 Regression] unable to see local variables due extra lexical block was generated

2012-12-05 Thread jason at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55541



Jason Merrill jason at gcc dot gnu.org changed:



   What|Removed |Added



 Status|ASSIGNED|NEW

 AssignedTo|jason at gcc dot gnu.org|unassigned at gcc dot

   ||gnu.org



--- Comment #5 from Jason Merrill jason at gcc dot gnu.org 2012-12-05 
16:22:15 UTC ---

I'm finding the LOCATION_BLOCK code somewhat opaque, and think that I should

take care of more recent regressions before diving into it too much, so I'm

going to put this aside for now.



I don't remember the rationale for the extra block, but changing

finish_function to strip it right away causes quite a few testsuite

regressions.


[Bug libstdc++/55594] [4.8 Regression] -Wa,-nH incorrectly added to compile line of all targets

2012-12-05 Thread aldyh at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55594



Aldy Hernandez aldyh at gcc dot gnu.org changed:



   What|Removed |Added



 CC||aldyh at gcc dot gnu.org



--- Comment #1 from Aldy Hernandez aldyh at gcc dot gnu.org 2012-12-05 
16:23:28 UTC ---

The patch that caused this is trunk@191218.


[Bug c++/55564] [4.8 Regression] internal error using decltype of a template type parameter for late-specified function result type

2012-12-05 Thread jason at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55564



Jason Merrill jason at gcc dot gnu.org changed:



   What|Removed |Added



 Status|NEW |ASSIGNED

 CC||jason at gcc dot gnu.org

 AssignedTo|unassigned at gcc dot   |jason at gcc dot gnu.org

   |gnu.org |


[Bug rtl-optimization/55598] LRA on powerpc does not like assembler in libgcc

2012-12-05 Thread meissner at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55598



--- Comment #2 from Michael Meissner meissner at gcc dot gnu.org 2012-12-05 
16:37:46 UTC ---

I'm trying the bootstrap of the lra branch right now.  I discovered the

bootstrap fails if I enable decimal floating point (i.e.

--enable-decimal-float).  More later.


[Bug c++/55513] [4.7/4.8 Regression] Incorrect snprintf folding when building with -std=c++0x

2012-12-05 Thread aldyh at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55513



Aldy Hernandez aldyh at gcc dot gnu.org changed:



   What|Removed |Added



 CC||aldyh at gcc dot gnu.org

 AssignedTo|unassigned at gcc dot   |aldyh at gcc dot gnu.org

   |gnu.org |



--- Comment #7 from Aldy Hernandez aldyh at gcc dot gnu.org 2012-12-05 
17:08:48 UTC ---

I'll take a look.


[Bug rtl-optimization/54739] [4.8 regression] FAIL: gcc.dg/lower-subreg-1.c scan-rtl-dump subreg1 Splitting reg

2012-12-05 Thread eager at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54739



--- Comment #12 from eager at gcc dot gnu.org 2012-12-05 17:27:10 UTC ---

Author: eager

Date: Wed Dec  5 17:27:05 2012

New Revision: 194226



URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=194226

Log:

PR rtl-optimization/54739

* config/microblaze/microblaze.md: (anddi3, iordi3, xordi3): Delete

patterns.



Modified:

trunk/gcc/ChangeLog

trunk/gcc/config/microblaze/microblaze.md


[Bug middle-end/55597] [4.8 Regression] internal compiler error: in plus_constant, at explow.c:88

2012-12-05 Thread hjl.tools at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55597



--- Comment #7 from H.J. Lu hjl.tools at gmail dot com 2012-12-05 17:28:11 
UTC ---

It is generated by



(gdb) bt

#0  set_unique_reg_note (insn=0x719a07e0, kind=REG_EQUAL, 

datum=0x71ab4460) at /export/gnu/import/git/gcc/gcc/emit-rtl.c:4958

#1  0x00726f1b in set_dst_reg_note (insn=0x719a07e0, 

kind=REG_EQUAL, datum=0x71ab4460, dst=0x71ab44c0)

at /export/gnu/import/git/gcc/gcc/emit-rtl.c:5018

#2  0x00949cbb in emit_libcall_block_1 (insns=0x71ab2730, 

target=0x71ab44c0, result=0x71ab4500, equiv=0x71ab4460, 

equiv_may_trap=false) at /export/gnu/import/git/gcc/gcc/optabs.c:3936

#3  0x00949d10 in emit_libcall_block (insns=0x71ab2730, 

target=0x71ab44c0, result=0x71ab4500, equiv=0x71ab4460)

at /export/gnu/import/git/gcc/gcc/optabs.c:3945

#4  0x00d082fa in legitimize_tls_address (x=0x71ab4460, 

model=TLS_MODEL_REAL, for_mov=true)

at /export/gnu/import/git/gcc/gcc/config/i386/i386.c:12805

#5  0x00d0f4bb in ix86_expand_move (mode=SImode, 

operands=0x7fffc920)

at /export/gnu/import/git/gcc/gcc/config/i386/i386.c:15936

#6  0x00dc1b60 in gen_movsi (operand0=0x71ab44a0, 

operand1=0x71aac2f0)

at /export/gnu/import/git/gcc/gcc/config/i386/i386.md:1701

#7  0x00750380 in emit_move_insn_1 (x=0x71ab44a0, y=0x71aac2f0)

at /export/gnu/import/git/gcc/gcc/expr.c:3417

#8  0x007507cd in emit_move_insn (x=0x71ab44a0, y=0x71aac2f0)

---Type return to continue, or q return to quit---

at /export/gnu/import/git/gcc/gcc/expr.c:3511

#9  0x00733def in copy_to_mode_reg (mode=SImode, x=0x71aac2f0)

at /export/gnu/import/git/gcc/gcc/explow.c:645

#10 0x009537f9 in maybe_legitimize_operand (

icode=CODE_FOR_zero_extendsidi2, opno=1, op=0x7fffcad0)

at /export/gnu/import/git/gcc/gcc/optabs.c:8069

#11 0x00953ac8 in maybe_legitimize_operands (

icode=CODE_FOR_zero_extendsidi2, opno=0, nops=2, ops=0x7fffcac0)

at /export/gnu/import/git/gcc/gcc/optabs.c:8131

#12 0x00953b5b in maybe_gen_insn (icode=CODE_FOR_zero_extendsidi2, 

nops=2, ops=0x7fffcac0) at /export/gnu/import/git/gcc/gcc/optabs.c:8149

#13 0x00949697 in maybe_emit_unop_insn (

icode=CODE_FOR_zero_extendsidi2, target=0x71ab4480, 

op0=0x71aac2f0, code=ZERO_EXTEND)

at /export/gnu/import/git/gcc/gcc/optabs.c:3765

#14 0x0094976b in emit_unop_insn (icode=CODE_FOR_zero_extendsidi2, 

target=0x71ab4480, op0=0x71aac2f0, code=ZERO_EXTEND)

at /export/gnu/import/git/gcc/gcc/optabs.c:3787

#15 0x00748f7a in convert_move (to=0x71ab4480, 

from=0x71aac2f0, unsignedp=1)

at /export/gnu/import/git/gcc/gcc/expr.c:607



(gdb) f 2

#2  0x00949cbb in emit_libcall_block_1 (insns=0x71ab2730, 

target=0x71ab44c0, result=0x71ab4500, equiv=0x71ab4460, 

equiv_may_trap=false) at /export/gnu/import/git/gcc/gcc/optabs.c:3936

3936  set_dst_reg_note (last, REG_EQUAL, copy_rtx (equiv), target);

(gdb) call debug_rtx (last)

(insn 6 5 0 (set (reg:DI 61)

(reg:DI 0 ax)) x.i:8 -1

 (nil))

(gdb) call debug_rtx (equiv)

(symbol_ref:SI (__morestack_initial_sp) [flags 0x10] var_decl 0x719bf390

__morestack_initial_sp)

(gdb)


[Bug c++/51927] [C++0x] Cannot access non-static members in initializer

2012-12-05 Thread js at lastlog dot de

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51927

js at lastlog dot de changed:

   What|Removed |Added

 CC||js at lastlog dot de

--- Comment #4 from js at lastlog dot de 2012-12-05 17:29:35 UTC ---
still seems to be broken in 4.7.2 :-P

but is known to be working with llvm 3.2

# make
simple.cpp: In lambda function:
simple.cpp:11:5: error: invalid use of non-static data member ‘testee::l1’
simple.cpp:15:9: error: from this location
make[2]: *** [CMakeFiles/simple.dir/simple.cpp.o] Error 1
make[1]: *** [CMakeFiles/simple.dir/all] Error 2
make: *** [all] Error 2
*** Failed ***

# g++ --version
g++ (Ubuntu/Linaro 4.7.2-11precise2) 4.7.2
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.


[Bug c++/54653] [4.6/4.7/4.8 Regression] tsubst_template_parms ICE

2012-12-05 Thread jason at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54653



Jason Merrill jason at gcc dot gnu.org changed:



   What|Removed |Added



   Keywords|ice-on-valid-code   |ice-on-invalid-code

   Priority|P2  |P3

 Status|NEW |ASSIGNED

 AssignedTo|unassigned at gcc dot   |jason at gcc dot gnu.org

   |gnu.org |



--- Comment #4 from Jason Merrill jason at gcc dot gnu.org 2012-12-05 
17:46:21 UTC ---

This code is actually ill-formed; the specialization



template typename R, template class T class D

struct E R (), D::G R (*) (), D

{

};



only has one template-header, and should have two.  Furthermore, this is a full

specialization of a member of a partial specialization, which is not allowed.



14.8/16: the declaration shall not explicitly specialize a class member

template if its enclosing class templates are not explicitly specialized as

well.


[Bug c++/54653] [4.6/4.7/4.8 Regression] tsubst_template_parms ICE

2012-12-05 Thread jakub at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54653



--- Comment #5 from Jakub Jelinek jakub at gcc dot gnu.org 2012-12-05 
17:49:20 UTC ---

Perhaps errors introduced during my testcase reduction.  The original bugreport

is

https://bugzilla.redhat.com/show_bug.cgi?id=858351


[Bug middle-end/55597] [4.8 Regression] internal compiler error: in plus_constant, at explow.c:88

2012-12-05 Thread hjl.tools at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55597



--- Comment #8 from H.J. Lu hjl.tools at gmail dot com 2012-12-05 17:55:51 
UTC ---

Does this patch



diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c

index a24e407..b496490 100644

--- a/gcc/config/i386/i386.c

+++ b/gcc/config/i386/i386.c

@@ -12802,6 +12802,8 @@ legitimize_tls_address (rtx x, enum tls_model model,

bool for_mov)

   end_sequence ();



   RTL_CONST_CALL_P (insns) = 1;

+  if (GET_MODE (x) != Pmode)

+x = gen_rtx_ZERO_EXTEND (Pmode, x);

   emit_libcall_block (insns, dest, rax, x);

 }

   else



make any senses?


[Bug rtl-optimization/55604] New: ICE while dumping in remove_some_program_points_and_update_live_ranges

2012-12-05 Thread aldyh at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55604



 Bug #: 55604

   Summary: ICE while dumping in

remove_some_program_points_and_update_live_ranges

Classification: Unclassified

   Product: gcc

   Version: 4.8.0

Status: UNCONFIRMED

  Severity: normal

  Priority: P3

 Component: rtl-optimization

AssignedTo: unassig...@gcc.gnu.org

ReportedBy: al...@gcc.gnu.org





reynosa:/build/trunk/gcc$ cat b.c



main ()

{

  char s[10];

  const int t = (__builtin_memcpy (s, Hello, 6), 5);

  __builtin_printf (%d %s\n, t, s);

}

reynosa:/build/trunk/gcc$ ./cc1plus b.c -O -dap  -quiet

b.c: In function 'int main()':

b.c:7:1: internal compiler error: Floating point exception

 }

 ^

0xc3fc61 crash_signal

/source/gcc/gcc/toplev.c:334

0xb01766 remove_some_program_points_and_update_live_ranges

/source/gcc/gcc/lra-lives.c:816

0xb01a6f compress_live_ranges

/source/gcc/gcc/lra-lives.c:898

0xb0200d lra_create_live_ranges(bool)

/source/gcc/gcc/lra-lives.c:986

0xae6964 lra(_IO_FILE*)

/source/gcc/gcc/lra.c:2297

0xa9c2b0 do_reload

/source/gcc/gcc/ira.c:4624

0xa9c4be rest_of_handle_reload

/source/gcc/gcc/ira.c:4737

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 rtl-optimization/55604] ICE while dumping in remove_some_program_points_and_update_live_ranges

2012-12-05 Thread aldyh at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55604



--- Comment #1 from Aldy Hernandez aldyh at gcc dot gnu.org 2012-12-05 
18:08:24 UTC ---

Created attachment 28884

  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28884

proposed patch


[Bug rtl-optimization/55604] ICE while dumping in remove_some_program_points_and_update_live_ranges

2012-12-05 Thread aldyh at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55604



Aldy Hernandez aldyh at gcc dot gnu.org changed:



   What|Removed |Added



 AssignedTo|unassigned at gcc dot   |aldyh at gcc dot gnu.org

   |gnu.org |



--- Comment #2 from Aldy Hernandez aldyh at gcc dot gnu.org 2012-12-05 
18:08:57 UTC ---

Mine.


[Bug rtl-optimization/55604] ICE while dumping in remove_some_program_points_and_update_live_ranges

2012-12-05 Thread aldyh at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55604



Aldy Hernandez aldyh at gcc dot gnu.org changed:



   What|Removed |Added



 Status|UNCONFIRMED |WAITING

   Last reconfirmed||2012-12-05

 Ever Confirmed|0   |1



--- Comment #3 from Aldy Hernandez aldyh at gcc dot gnu.org 2012-12-05 
18:15:29 UTC ---

Proposed patch:

http://gcc.gnu.org/ml/gcc-patches/2012-12/msg00336.html


[Bug c++/10541] [DR 354] Is NULL a valid pointer-type template argument?

2012-12-05 Thread paolo.carlini at oracle dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10541



Paolo Carlini paolo.carlini at oracle dot com changed:



   What|Removed |Added



 CC|gcc-bugs at gcc dot gnu.org |



--- Comment #11 from Paolo Carlini paolo.carlini at oracle dot com 2012-12-05 
18:46:11 UTC ---

In C++11 mode we now accept these expressions. Not sure if we still want to

implement this old special case in C++98 mode.


[Bug rtl-optimization/54739] [4.8 regression] FAIL: gcc.dg/lower-subreg-1.c scan-rtl-dump subreg1 Splitting reg

2012-12-05 Thread steven at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54739



Steven Bosscher steven at gcc dot gnu.org changed:



   What|Removed |Added



 Status|NEW |RESOLVED

 Resolution||FIXED



--- Comment #13 from Steven Bosscher steven at gcc dot gnu.org 2012-12-05 
18:48:19 UTC ---

per comments #10 - #12


[Bug lto/55605] New: FAIL: gcc.c-torture/execute/builtins/20010124-1.c compilation, -O2 -flto -flto-partition=none

2012-12-05 Thread danglin at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55605



 Bug #: 55605

   Summary: FAIL: gcc.c-torture/execute/builtins/20010124-1.c

compilation,  -O2 -flto -flto-partition=none

Classification: Unclassified

   Product: gcc

   Version: 4.8.0

Status: UNCONFIRMED

  Severity: normal

  Priority: P3

 Component: lto

AssignedTo: unassig...@gcc.gnu.org

ReportedBy: dang...@gcc.gnu.org

  Host: armv5tejl-unknown-linux-gnueabi

Target: armv5tejl-unknown-linux-gnueabi

 Build: armv5tejl-unknown-linux-gnueabi





Executing on host: /home/dave/gnu/gcc/objdir/gcc/xgcc

-B/home/dave/gnu/gcc/objdi

r/gcc/

/home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.c-torture/execute/builtins/20010

124-1.c

/home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.c-torture/execute/builtins/2001

0124-1-lib.c

/home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.c-torture/execute/builtins

/lib/main.c  -fno-diagnostics-show-caret  -w  -O2 -flto -flto-partition=none 

-f

no-tree-loop-distribute-patterns  -lm   -o

/home/dave/gnu/gcc/objdir/gcc/testsui

te/gcc/20010124-1.x7(timeout = 300)

/home/dave/opt/gnu/bin/ld:

/home/dave/gnu/gcc/objdir/gcc/testsuite/gcc/20010124-

1.x7: hidden symbol `__sync_synchronize' in

/home/dave/gnu/gcc/objdir/gcc/libgcc

.a(linux-atomic.o) is referenced by DSO

/home/dave/opt/gnu/bin/ld: final link failed: Bad value

collect2: error: ld returned 1 exit status

compiler exited with status 1

output is:

/home/dave/opt/gnu/bin/ld:

/home/dave/gnu/gcc/objdir/gcc/testsuite/gcc/20010124-

1.x7: hidden symbol `__sync_synchronize' in

/home/dave/gnu/gcc/objdir/gcc/libgcc

.a(linux-atomic.o) is referenced by DSO

/home/dave/opt/gnu/bin/ld: final link failed: Bad value

collect2: error: ld returned 1 exit status



FAIL: gcc.c-torture/execute/builtins/20010124-1.c compilation,  -O2 -flto

-flto-partition=none



There are several thousand similar fails.


[Bug rtl-optimization/51771] trans-mem: abnormal edges get lost or corrupted

2012-12-05 Thread torvald at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51771



torvald at gcc dot gnu.org changed:



   What|Removed |Added



 Status|WAITING |RESOLVED

 Resolution||FIXED



--- Comment #11 from torvald at gcc dot gnu.org 2012-12-05 19:18:42 UTC ---

I can't reproduce this anymore.  I also had a brief look at the binary code

that showed the problem previously and didn't see the problematic pattern

anymore.  So it seems that this is fixed.


[Bug middle-end/55597] [4.8 Regression] internal compiler error: in plus_constant, at explow.c:88

2012-12-05 Thread ubizjak at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55597



--- Comment #9 from Uros Bizjak ubizjak at gmail dot com 2012-12-05 20:45:40 
UTC ---

I think it is better to fixup all sites where equivalent is used:



--cut here--

Index: i386.c

===

--- i386.c  (revision 194226)

+++ i386.c  (working copy)

@@ -12754,11 +12754,17 @@ ix86_tls_module_base (void)

 static rtx

 legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)

 {

+  rtx xeq;

   rtx dest, base, off;

   rtx pic = NULL_RTX, tp = NULL_RTX;

   enum machine_mode tp_mode = Pmode;

   int type;



+  if (GET_MODE (x) != Pmode)

+xeq = gen_rtx_ZERO_EXTEND (Pmode, x);

+  else

+xeq = x;

+

   switch (model)

 {

 case TLS_MODEL_GLOBAL_DYNAMIC:

@@ -12785,7 +12791,7 @@ legitimize_tls_address (rtx x, enum tls_model mode

  tp = get_thread_pointer (Pmode, true);

  dest = force_reg (Pmode, gen_rtx_PLUS (Pmode, tp, dest));



- set_unique_reg_note (get_last_insn (), REG_EQUAL, x);

+ set_unique_reg_note (get_last_insn (), REG_EQUAL, xeq);

}

   else

{

@@ -12802,7 +12808,7 @@ legitimize_tls_address (rtx x, enum tls_model mode

  end_sequence ();



  RTL_CONST_CALL_P (insns) = 1;

- emit_libcall_block (insns, dest, rax, x);

+ emit_libcall_block (insns, dest, rax, xeq);

}

  else

emit_insn (gen_tls_global_dynamic_32 (dest, x, pic, caddr));

@@ -12871,7 +12877,7 @@ legitimize_tls_address (rtx x, enum tls_model mode

{

  dest = force_reg (Pmode, gen_rtx_PLUS (Pmode, dest, tp));



- set_unique_reg_note (get_last_insn (), REG_EQUAL, x);

+ set_unique_reg_note (get_last_insn (), REG_EQUAL, xeq);

}

   break;



--cut here--


[Bug target/54160] [4.6/4.7/4.8 Regression] gcc should not define __OBJC2__ when lang is not set to ObjC (gcc 4.6 and later)

2012-12-05 Thread aldyh at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54160



--- Comment #5 from Aldy Hernandez aldyh at gcc dot gnu.org 2012-12-05 
21:10:25 UTC ---

Author: aldyh

Date: Wed Dec  5 21:10:18 2012

New Revision: 194227



URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=194227

Log:

PR target/54160

* config/t-darwin (darwin-c.o): Depend on $(CPP_INTERNAL_H).

* config/darwin-c.c (darwin_cpp_builtins): Only set __OBJC2__

when in obj mode.

Include libcpp/internal.h.



Modified:

trunk/gcc/ChangeLog

trunk/gcc/config/darwin-c.c

trunk/gcc/config/t-darwin


[Bug target/54160] [4.6/4.7/4.8 Regression] gcc should not define __OBJC2__ when lang is not set to ObjC (gcc 4.6 and later)

2012-12-05 Thread aldyh at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54160



Aldy Hernandez aldyh at gcc dot gnu.org changed:



   What|Removed |Added



 Status|NEW |RESOLVED

 Resolution||FIXED



--- Comment #6 from Aldy Hernandez aldyh at gcc dot gnu.org 2012-12-05 
21:13:09 UTC ---

Fixed on trunk.


[Bug c++/55032] [4.7/4.8 Regression] Internal compiler error: in strip_typedefs, at cp/tree.c:1199

2012-12-05 Thread jason at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55032



Jason Merrill jason at gcc dot gnu.org changed:



   What|Removed |Added



 Status|NEW |ASSIGNED

 AssignedTo|unassigned at gcc dot   |jason at gcc dot gnu.org

   |gnu.org |


[Bug fortran/55534] -Wno-missing-include-dirs does not work with gfortran

2012-12-05 Thread anlauf at gmx dot de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55534



--- Comment #3 from Harald Anlauf anlauf at gmx dot de 2012-12-05 21:43:43 
UTC ---

(In reply to comment #2)

 (See PR 54033 for the patch which originally added this feature.)

 

 Untested patch.



With this patch, the warning is also gone.  :-)



However, now using the option -Wmissing-include-dirs

yields the message:



f951: warning: command line option '-Wmissing-include-dirs' is valid for

C/C++/ObjC/ObjC++ but not for Fortran [enabled by default]



Which might not be intended, although I can live with it. :-)



I addition to the patch in comment #2 tried:



Index: gcc/fortran/lang.opt

===

--- gcc/fortran/lang.opt(revision 194167)

+++ gcc/fortran/lang.opt(working copy)

@@ -254,6 +254,10 @@

 Fortran Warning

 Warn on intrinsics not part of the selected standard



+Wmissing-include-dirs

+Fortran Warning

+; Documented in C

+

 Wreal-q-constant

 Fortran Warning

 Warn about real-literal-constants with 'q' exponent-letter





Now the above warning is gone, but some piece is still missing...


[Bug c++/55015] [4.7/4.8 Regression] Lambda functions not found at link time when declared in an inline function

2012-12-05 Thread jason at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55015



Jason Merrill jason at gcc dot gnu.org changed:



   What|Removed |Added



 Status|NEW |ASSIGNED

 CC||jason at gcc dot gnu.org

 AssignedTo|unassigned at gcc dot   |jason at gcc dot gnu.org

   |gnu.org |


[Bug rtl-optimization/55604] ICE while dumping in remove_some_program_points_and_update_live_ranges

2012-12-05 Thread steven at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55604



--- Comment #4 from Steven Bosscher steven at gcc dot gnu.org 2012-12-05 
23:55:31 UTC ---

Author: steven

Date: Wed Dec  5 23:55:28 2012

New Revision: 194230



URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=194230

Log:

PR rtl-optimization/55604

* lra-lives.c (lra_create_live_ranges): If there are no referenced

pseudos left, do not compute live ranges.





Modified:

trunk/gcc/ChangeLog

trunk/gcc/lra-lives.c


[Bug rtl-optimization/55604] ICE while dumping in remove_some_program_points_and_update_live_ranges

2012-12-05 Thread steven at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55604



Steven Bosscher steven at gcc dot gnu.org changed:



   What|Removed |Added



 Status|WAITING |RESOLVED

 Resolution||FIXED

 AssignedTo|aldyh at gcc dot gnu.org|steven at gcc dot gnu.org


[Bug fortran/55534] -Wno-missing-include-dirs does not work with gfortran

2012-12-05 Thread burnus at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55534



--- Comment #4 from Tobias Burnus burnus at gcc dot gnu.org 2012-12-06 
00:04:34 UTC ---

(In reply to comment #3)

 I addition to the patch in comment #2 tried:



That piece I also had, but I forgot to include it in the diff. (I have too many

patches on that tree.





 Now the above warning is gone, but some piece is still missing...



* The -I/foo/bar might come before -Wno-missing-include-dirs in

gfc_handle_option; thus, the warning in add_path_to_list doesn't trigger.



* With the patch and the warning activated, the compiler crashes in

gcc/incpath.c's remove_duplicates for cur-name == /no/such/dir.


[Bug c++/55606] New: sorry, unimplemented: non-trivial designated initializers not supported

2012-12-05 Thread hjl.tools at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55606



 Bug #: 55606

   Summary: sorry, unimplemented: non-trivial designated

initializers not supported

Classification: Unclassified

   Product: gcc

   Version: 4.8.0

Status: UNCONFIRMED

  Severity: normal

  Priority: P3

 Component: c++

AssignedTo: unassig...@gcc.gnu.org

ReportedBy: hjl.to...@gmail.com





[hjl@gnu-6 build]$ cat x.c

struct foo {

  char x[128];

  unsigned* i;

};

struct foo x = {

i: 0

};

[hjl@gnu-6 build]$ gcc -S x.c  

[hjl@gnu-6 build]$ g++ -S x.c 

x.c:7:1: sorry, unimplemented: non-trivial designated initializers not

supported

[hjl@gnu-6 build]$


[Bug c++/55606] sorry, unimplemented: non-trivial designated initializers not supported

2012-12-05 Thread paolo.carlini at oracle dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55606



--- Comment #1 from Paolo Carlini paolo.carlini at oracle dot com 2012-12-06 
00:21:19 UTC ---

So? Do we have a plan of filing a PR for each sorry message?


[Bug middle-end/55597] [4.8 Regression] internal compiler error: in plus_constant, at explow.c:88

2012-12-05 Thread hjl.tools at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55597



--- Comment #10 from H.J. Lu hjl.tools at gmail dot com 2012-12-06 00:21:55 
UTC ---

(In reply to comment #9)

 I think it is better to fixup all sites where equivalent is used:

 



It works.  Thanks.


[Bug c++/55606] sorry, unimplemented: non-trivial designated initializers not supported

2012-12-05 Thread hjl.tools at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55606



--- Comment #2 from H.J. Lu hjl.tools at gmail dot com 2012-12-06 00:29:07 
UTC ---

why does



struct foo x = {

i: 0

};



work?


[Bug c++/55606] sorry, unimplemented: non-trivial designated initializers not supported

2012-12-05 Thread hjl.tools at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55606



--- Comment #3 from H.J. Lu hjl.tools at gmail dot com 2012-12-06 00:30:11 
UTC ---

BTW, clang works fine:



[hjl@gnu-6 tmp]$ /opt/llvm.old/bin/clang -c i.c

i.c:6:5: warning: use of GNU old-style field designator extension

  [-Wgnu-designator]

i: 0

^~

.i = 

1 warning generated.

[hjl@gnu-6 tmp]$


[Bug c++/55606] sorry, unimplemented: non-trivial designated initializers not supported

2012-12-05 Thread hjl.tools at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55606



--- Comment #4 from H.J. Lu hjl.tools at gmail dot com 2012-12-06 00:32:46 
UTC ---

[hjl@gnu-6 tmp]$ cat i.cc

struct foo {

  char x[128];

  unsigned* i;

};

struct foo x = {

.i = 0

};

[hjl@gnu-6 tmp]$ /opt/llvm.old/bin/clang -c i.cc

[hjl@gnu-6 tmp]$ g++ -c i.cc

i.cc:7:1: sorry, unimplemented: non-trivial designated initializers not

supported

[hjl@gnu-6 tmp]$


[Bug c++/55606] sorry, unimplemented: non-trivial designated initializers not supported

2012-12-05 Thread hjl.tools at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55606



--- Comment #5 from H.J. Lu hjl.tools at gmail dot com 2012-12-06 00:35:38 
UTC ---

This works:



[hjl@gnu-6 tmp]$ cat i.cc

struct foo {

  char x[128];

  unsigned* i;

};

struct foo x = {

foo,

.i = 0

};

[hjl@gnu-6 tmp]$ g++ -c i.cc

[hjl@gnu-6 tmp]$


[Bug c++/55606] sorry, unimplemented: non-trivial designated initializers not supported

2012-12-05 Thread paolo.carlini at oracle dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55606



--- Comment #6 from Paolo Carlini paolo.carlini at oracle dot com 2012-12-06 
00:35:53 UTC ---

I'm not saying that some work should not be done, I'm saying that sorry message

normally correspond to *known* issues, we don't need PRs for those, more or

less by definition. But what can I tell you, if you like to have a PR for this,

let's have it.


[Bug middle-end/50283] [4.7 Regression] FAIL: g++.dg/eh/simd-1.C execution test

2012-12-05 Thread danglin at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50283



--- Comment #19 from John David Anglin danglin at gcc dot gnu.org 2012-12-06 
02:19:55 UTC ---

Author: danglin

Date: Thu Dec  6 02:19:48 2012

New Revision: 194238



URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=194238

Log:

Backport for mainline:

2011-11-30  John David Anglin  dave.ang...@nrc-cnrc.gc.ca



PR middle-end/50283

* config/pa/pa.md (in_branch_delay): Disallow frame related insns.

(in_nullified_branch_delay): Likewise.

(in_call_delay): Likewise.



2012-11-12  John David Anglin  dave.ang...@nrc-cnrc.gc.ca



PR target/55195

* config/pa/pa.md (type): Add sibcall and sh_func_adrs insn types.

(in_branch_delay): Don't allow sibcall or sh_func_adrs insns.

(in_nullified_branch_delay): Likewise.

(in_call_delay): Likewise.

Define delay for sibcall insns.  Adjust Z3 and Z4 insn reservations for

new types.  Add opaque cond to mark all calls, sibcalls, dyncalls and

the $$sh_func_adrs call as variable.  Update type of sibcalls and

$$sh_func_adrs call.

* config/pa/pa.c (pa_adjust_insn_length): Revise to return updated

length instead of adjustment.  Handle negative and undefined call

adjustments for insn_default_length.  Remove adjustment for millicode

insn with unfilled delay slot.

(pa_output_millicode_call): Update for revised millicode length.

* config/pa/pa.h (ADJUST_INSN_LENGTH): Revise to set LENGTH.



2012-12-05  John David Anglin  dave.ang...@nrc-cnrc.gc.ca



* config/pa/pa.md: Use const_int 0 instead of match_test to simplify

opaque cond in all call insns.





Modified:

branches/gcc-4_6-branch/gcc/ChangeLog

branches/gcc-4_6-branch/gcc/config/pa/pa.c

branches/gcc-4_6-branch/gcc/config/pa/pa.h

branches/gcc-4_6-branch/gcc/config/pa/pa.md


[Bug target/55195] [4.8 Regression] shorten_branches generates incorrect forward branch distances

2012-12-05 Thread danglin at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55195



--- Comment #19 from John David Anglin danglin at gcc dot gnu.org 2012-12-06 
02:19:57 UTC ---

Author: danglin

Date: Thu Dec  6 02:19:48 2012

New Revision: 194238



URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=194238

Log:

Backport for mainline:

2011-11-30  John David Anglin  dave.ang...@nrc-cnrc.gc.ca



PR middle-end/50283

* config/pa/pa.md (in_branch_delay): Disallow frame related insns.

(in_nullified_branch_delay): Likewise.

(in_call_delay): Likewise.



2012-11-12  John David Anglin  dave.ang...@nrc-cnrc.gc.ca



PR target/55195

* config/pa/pa.md (type): Add sibcall and sh_func_adrs insn types.

(in_branch_delay): Don't allow sibcall or sh_func_adrs insns.

(in_nullified_branch_delay): Likewise.

(in_call_delay): Likewise.

Define delay for sibcall insns.  Adjust Z3 and Z4 insn reservations for

new types.  Add opaque cond to mark all calls, sibcalls, dyncalls and

the $$sh_func_adrs call as variable.  Update type of sibcalls and

$$sh_func_adrs call.

* config/pa/pa.c (pa_adjust_insn_length): Revise to return updated

length instead of adjustment.  Handle negative and undefined call

adjustments for insn_default_length.  Remove adjustment for millicode

insn with unfilled delay slot.

(pa_output_millicode_call): Update for revised millicode length.

* config/pa/pa.h (ADJUST_INSN_LENGTH): Revise to set LENGTH.



2012-12-05  John David Anglin  dave.ang...@nrc-cnrc.gc.ca



* config/pa/pa.md: Use const_int 0 instead of match_test to simplify

opaque cond in all call insns.





Modified:

branches/gcc-4_6-branch/gcc/ChangeLog

branches/gcc-4_6-branch/gcc/config/pa/pa.c

branches/gcc-4_6-branch/gcc/config/pa/pa.h

branches/gcc-4_6-branch/gcc/config/pa/pa.md


[Bug c++/54947] [4.7/4.8 Regression] [C++11] lambda cannot capture-by-copy inside braced-init-list

2012-12-05 Thread jason at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54947



Jason Merrill jason at gcc dot gnu.org changed:



   What|Removed |Added



 Status|NEW |ASSIGNED

 AssignedTo|unassigned at gcc dot   |jason at gcc dot gnu.org

   |gnu.org |


[Bug c++/55607] New: undefined reference with rvalue lambda at non-namespace scope

2012-12-05 Thread f.heckenb...@fh-soft.de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55607



 Bug #: 55607

   Summary: undefined reference with rvalue lambda at

non-namespace scope

Classification: Unclassified

   Product: gcc

   Version: 4.7.2

Status: UNCONFIRMED

  Severity: normal

  Priority: P3

 Component: c++

AssignedTo: unassig...@gcc.gnu.org

ReportedBy: f.heckenb...@fh-soft.de





Created attachment 28885

  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28885

Reproducible test case



Compiling the attached test case with g++ 4.7.2 (g++-4.7 -std=c++11

ud-lambda.cpp) gives the following error:



/tmp/ccNp8EwS.o: In function `foo::bar()::{lambda()#1}::operator void (*)()()

const':

ud-lambda.cpp:(.text._ZZN3foo3barEvENKUlvE_cvPFvvEEv[_ZZN3foo3barEvENKUlvE_cvPFvvEEv]+0x4):

undefined reference to `foo::bar()::{lambda()#1}::_FUN()'

collect2: error: ld returned 1 exit status



The error did not occur with 4.7.0.



The demo program shows two variants using #if (since I apparently can't add

two separate attachments here). Both show the same problem. I'm not sure which

one is more useful.



The important points are that a lambda is used as an rvalue -- in the first

case due to the +, in the second case due to the conversion to a function

pointer -- and that it's done in a nested scope (here, struct foo).



I suppose the test case is correct, but in case it's not, I'd expect a compiler

error, not a link-time undefined reference.



% g++-4.7 -v  

COLLECT_GCC=g++-4.7

COLLECT_LTO_WRAPPER=/usr/lib/gcc/i486-linux-gnu/4.7/lto-wrapper

Target: i486-linux-gnu

Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-4'

--with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs

--enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr

--program-suffix=-4.7 --enable-shared --enable-linker-build-id

--with-system-zlib --libexecdir=/usr/lib --without-included-gettext

--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7

--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu

--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object

--enable-plugin --enable-objc-gc --enable-targets=all --with-arch-32=i586

--with-tune=generic --enable-checking=release --build=i486-linux-gnu

--host=i486-linux-gnu --target=i486-linux-gnu

Thread model: posix

gcc version 4.7.2 (Debian 4.7.2-4)