[Bug lto/54625] [4.8 Regression] lto/profiledbootstrap broken by r191466: ICE: in cgraph_clone_edge, at cgraphclones.c:123

2013-10-14 Thread mrs at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54625

mrs at gcc dot gnu.org  changed:

   What|Removed |Added

 CC||mrs at gcc dot gnu.org

--- Comment #10 from mrs at gcc dot gnu.org  ---
xgcc: error: /home/mrs/wg/gcc/gcc/testsuite/gcc.dg/lto/pr54625-2_1.C: C++
compiler not installed on this system^M

FAIL: gcc.dg/lto/pr54625-2 c_lto_pr54625-2_1.o assemble, -O2 -flto
-fuse-linker-plugin


shouldn't C++ testcases go into the C++ testsuite?


[Bug lto/54625] [4.8 Regression] lto/profiledbootstrap broken by r191466: ICE: in cgraph_clone_edge, at cgraphclones.c:123

2012-09-25 Thread rguenth at gcc dot gnu.org


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



Richard Guenther  changed:



   What|Removed |Added



 Status|UNCONFIRMED |RESOLVED

 Resolution||FIXED



--- Comment #9 from Richard Guenther  2012-09-25 
15:07:51 UTC ---

Fixed.  Please open a new bug for the mozilla issue.


[Bug lto/54625] [4.8 Regression] lto/profiledbootstrap broken by r191466: ICE: in cgraph_clone_edge, at cgraphclones.c:123

2012-09-25 Thread rguenth at gcc dot gnu.org


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



--- Comment #8 from Richard Guenther  2012-09-25 
15:06:25 UTC ---

Author: rguenth

Date: Tue Sep 25 15:06:17 2012

New Revision: 191713



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

Log:

2012-09-25  Richard Guenther  



PR lto/54625

* lto-symtab.c (lto_symtab_merge_cgraph_nodes_1): Do not merge

cgraph nodes for builtins.



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

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

* gcc.dg/lto/pr54625-1_0.c: Likewise.

* gcc.dg/lto/pr54625-1_1.C: Likewise.

* gcc.dg/lto/pr54625-2_0.c: Likewise.

* gcc.dg/lto/pr54625-2_1.C: Likewise.



Added:

trunk/gcc/testsuite/gcc.dg/lto/pr54625-1_0.c

trunk/gcc/testsuite/gcc.dg/lto/pr54625-1_1.C

trunk/gcc/testsuite/gcc.dg/lto/pr54625-2_0.c

trunk/gcc/testsuite/gcc.dg/lto/pr54625-2_1.C

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

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

Modified:

trunk/gcc/ChangeLog

trunk/gcc/lto-symtab.c

trunk/gcc/testsuite/ChangeLog


[Bug lto/54625] [4.8 Regression] lto/profiledbootstrap broken by r191466: ICE: in cgraph_clone_edge, at cgraphclones.c:123

2012-09-25 Thread markus at trippelsdorf dot de


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



--- Comment #7 from Markus Trippelsdorf  
2012-09-25 14:24:58 UTC ---

(In reply to comment #6)

> The testcases are also fixed by

> 

> Index: gcc/lto-symtab.c

> ===

> --- gcc/lto-symtab.c(revision 191700)

> +++ gcc/lto-symtab.c(working copy)

> @@ -629,7 +629,8 @@ lto_symtab_merge_cgraph_nodes_1 (symtab_

> 

>if (!symtab_real_symbol_p (e))

> continue;

> -  if (symtab_function_p (e))

> +  if (symtab_function_p (e)

> + && !DECL_BUILT_IN (e->symbol.decl))

> lto_cgraph_replace_node (cgraph (e), cgraph (prevailing));

>if (symtab_variable_p (e))

> lto_varpool_replace_node (varpool (e), varpool (prevailing));

> 

> now testing that instead of the symtab.c hunks.



Thanks. This fixes lto/profiledbootstrap.



Firefox however doesn't build:

...

gcc -shared -Wl,-soname -Wl,libnspr4.so -o libnspr4.so ./prvrsion.o

io/./prfdcach.o io/./prmwait.o io/./prmapopt.o io/./priometh.o io/./pripv6.o

io/.

/prlayer.o io/./prlog.o io/./prmmap.o io/./prpolevt.o io/./prprf.o

io/./prscanf.o io/./prstdio.o threads/./prcmon.o threads/./prrwlock.o

threads/./pr

tpd.o linking/./prlink.o malloc/./prmalloc.o malloc/./prmem.o md/./prosdep.o

memory/./prshm.o memory/./prshma.o memory/./prseg.o misc/./pralarm.o mis

c/./pratom.o misc/./prcountr.o misc/./prdtoa.o misc/./prenv.o misc/./prerr.o

misc/./prerror.o misc/./prerrortable.o misc/./prinit.o misc/./prinrval.o

 misc/./pripc.o misc/./prlog2.o misc/./prlong.o misc/./prnetdb.o

misc/./praton.o misc/./prolock.o misc/./prrng.o misc/./prsystem.o

misc/./prthinfo.o 

misc/./prtpool.o misc/./prtrace.o misc/./prtime.o pthreads/./ptsynch.o

pthreads/./ptio.o pthreads/./ptthread.o pthreads/./ptmisc.o md/unix/./unix.o m

d/unix/./unix_errors.o md/unix/./uxproces.o md/unix/./uxrng.o md/unix/./uxshm.o

md/unix/./uxwrap.o md/unix/./linux.o md/unix/./os_Linux_x86_64.o  -fu

se-linker-plugin -Wl,-O1,--hash-style=gnu,--no-keep-memory  -fprofile-use 

-lpthread -ldl

/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:

error: /tmp/ccdZgGDF.ltrans0.ltrans.o: requires dynamic R_X86_64_PC32 

reloc against 'strlen' which may overflow at runtime; recompile with -fPIC

/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:

error: /tmp/ccdZgGDF.ltrans1.ltrans.o: requires dynamic R_X86_64_PC32 

reloc against 'strncmp' which may overflow at runtime; recompile with -fPIC

/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:

error: /tmp/ccdZgGDF.ltrans2.ltrans.o: requires dynamic R_X86_64_PC32 

reloc against 'strlen' which may overflow at runtime; recompile with -fPIC

/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:

error: /tmp/ccdZgGDF.ltrans3.ltrans.o: requires dynamic R_X86_64_PC32 

reloc against 'memset' which may overflow at runtime; recompile with -fPIC

/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:

error: /tmp/ccdZgGDF.ltrans7.ltrans.o: requires dynamic R_X86_64_PC32 

reloc against 'strlen' which may overflow at runtime; recompile with -fPIC

/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:

error: /tmp/ccdZgGDF.ltrans8.ltrans.o: requires dynamic R_X86_64_PC32 

reloc against 'memset' which may overflow at runtime; recompile with -fPIC

/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:

error: /tmp/ccdZgGDF.ltrans10.ltrans.o: requires dynamic R_X86_64_PC32

 reloc against 'strcpy' which may overflow at runtime; recompile with -fPIC

/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:

error: /tmp/ccdZgGDF.ltrans11.ltrans.o: requires dynamic R_X86_64_PC32

 reloc against 'memcpy' which may overflow at runtime; recompile with -fPIC

/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:

error: /tmp/ccdZgGDF.ltrans12.ltrans.o: requires dynamic R_X86_64_PC32

 reloc against 'memset' which may overflow at runtime; recompile with -fPIC

/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:

error: /tmp/ccdZgGDF.ltrans13.ltrans.o: requires dynamic R_X86_64_PC32

 reloc against 'memcpy' which may overflow at runtime; recompile with -fPIC

/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:

error: /tmp/ccdZgGDF.ltrans14.ltrans.o: requires dynamic R_X86_64_PC32

 reloc against 'memcpy' which may overflow at runtime; recompile with -fPIC

/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:

error: /tmp/ccdZgGDF.ltrans15.ltrans.o: requires dynamic R_X86_64_PC32

 reloc against 'memcpy' which may overflow at runtime; recompile with -fPIC

/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:

error: /tmp/ccdZgGDF.ltrans16.ltrans.o: requires dynamic R_X86_64_PC32

[Bug lto/54625] [4.8 Regression] lto/profiledbootstrap broken by r191466: ICE: in cgraph_clone_edge, at cgraphclones.c:123

2012-09-25 Thread rguenth at gcc dot gnu.org


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



--- Comment #6 from Richard Guenther  2012-09-25 
13:28:13 UTC ---

The testcases are also fixed by



Index: gcc/lto-symtab.c

===

--- gcc/lto-symtab.c(revision 191700)

+++ gcc/lto-symtab.c(working copy)

@@ -629,7 +629,8 @@ lto_symtab_merge_cgraph_nodes_1 (symtab_



   if (!symtab_real_symbol_p (e))

continue;

-  if (symtab_function_p (e))

+  if (symtab_function_p (e)

+ && !DECL_BUILT_IN (e->symbol.decl))

lto_cgraph_replace_node (cgraph (e), cgraph (prevailing));

   if (symtab_variable_p (e))

lto_varpool_replace_node (varpool (e), varpool (prevailing));



now testing that instead of the symtab.c hunks.


[Bug lto/54625] [4.8 Regression] lto/profiledbootstrap broken by r191466: ICE: in cgraph_clone_edge, at cgraphclones.c:123

2012-09-25 Thread rguenth at gcc dot gnu.org


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



--- Comment #5 from Richard Guenther  2012-09-25 
13:23:25 UTC ---

Created attachment 28267

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

non-working patch with testcases



Confirmed.  Non-working patch (from PR54702) with all testcases.


[Bug lto/54625] [4.8 Regression] lto/profiledbootstrap broken by r191466: ICE: in cgraph_clone_edge, at cgraphclones.c:123

2012-09-25 Thread rguenth at gcc dot gnu.org


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



Richard Guenther  changed:



   What|Removed |Added



 CC||dimhen at gmail dot com



--- Comment #4 from Richard Guenther  2012-09-25 
13:16:47 UTC ---

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


[Bug lto/54625] [4.8 Regression] lto/profiledbootstrap broken

2012-09-22 Thread markus at trippelsdorf dot de

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

--- Comment #3 from Markus Trippelsdorf  
2012-09-22 08:06:55 UTC ---
Here is another example (this one triggers the same gcc_assert as in HJ's 
regression report):

markus@x4 moz_lto_debug % < test.i
float a;
double sin ();
update_filter ()
{
a = sin (0);
}

markus@x4 moz_lto_debug % < test.ii
extern "C" double sin (double);
typedef double (*UnaryFunType) (double);
class A
{
public:
int hash ();
void lookup (UnaryFunType p1)
{
int a = hash ();
p1 (0);
}
};
A b, c;
void
math_sin_impl ()
{
b.lookup (sin);
}

void
js_math_sqrt ()
{
c.lookup (0);
}

markus@x4 moz_lto_debug % gcc -o test.o -c -flto test.i
markus@x4 moz_lto_debug % g++ -r -nostdlib test.o test.ii -flto -O2
In file included from test.ii:1:0,
 from :4:
test.ii: In function ‘math_sin_impl’:
test.ii:17:19: internal compiler error: in cgraph_clone_edge, at
cgraphclones.c:123
 b.lookup (sin);
   ^
Please submit a full bug report,


[Bug lto/54625] [4.8 Regression] lto/profiledbootstrap broken

2012-09-21 Thread markus at trippelsdorf dot de

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

--- Comment #2 from Markus Trippelsdorf  
2012-09-22 04:38:14 UTC ---
Firefox also fails during the last libxul link of an lto/profiled build:

...
/var/tmp/mozilla-central/js/src/jsmath.cpp: In function ‘math_sin’:
/var/tmp/mozilla-central/js/src/jsmath.cpp:589:0: internal compiler error:
Segmentation fault
 return cache->lookup(sin, x);
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make[2]: *** [/tmp/cckLE2MY.ltrans20.ltrans.o] Error 1


I've reduced this error with delta & C-reduce:

markus@x4 moz2 % cat test.i
float a;
double sin ();
speex_resampler_init_frac ()
{
a = sin (0);
}

markus@x4 moz2 % cat test.ii
extern "C" double sin (double);
typedef double UnaryFunType (double);
class A
{
public:
int hash ();
double lookup (UnaryFunType p1)
{
int a = hash ();
if (p1)
return 0;
}
};
A b;
void
math_sin_impl ()
{
b.lookup (sin);
}

markus@x4 moz2 % gcc -o test.o -c -flto -O2 test.i
markus@x4 moz2 % g++ -r -nostdlib test.o test.ii -flto -O2
lto1: internal compiler error: in cgraph_create_virtual_clone, at
cgraphclones.c:344
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
lto-wrapper: /var/tmp/foo/usr/local/bin/g++ returned 1 exit status
/usr/bin/ld: fatal error: lto-wrapper failed
collect2: error: ld returned 1 exit status


[Bug lto/54625] [4.8 Regression] lto/profiledbootstrap broken

2012-09-19 Thread markus at trippelsdorf dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54625

--- Comment #1 from Markus Trippelsdorf  
2012-09-19 14:30:54 UTC ---
See also:
http://gcc.gnu.org/ml/gcc-regression/2012-09/msg00305.html
http://gcc.gnu.org/ml/gcc-regression/2012-09/msg00308.html


[Bug lto/54625] [4.8 Regression] lto/profiledbootstrap broken

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

Richard Guenther  changed:

   What|Removed |Added

 CC||hubicka at gcc dot gnu.org
   Target Milestone|--- |4.8.0