This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug lto/51573] [4.7 Regression] ICE (segfault) in lto_varpool_encoder_encode_initializer_p


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

--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-16 12:50:05 UTC ---
(In reply to comment #6)
> It's a really messed up situation as with the C++ units
> 
> void
> bar1 (void)
> {
>   extern void foo (int);
>   foo (0);
> }
> 
> ---
> 
> void
> bar2 (void)
> {
>   extern void foo (int);
>   foo (0);
> }
> 
> ---
> 
> void foo (int) {}
> 
> we _do_ need to enter the function local foo's for decl/cgraph merging.
> But OTOH we cannot, as the merged decl can only appear in one BLOCK_VARS
> list.  ISTM that either the frontends should move those over to
> BLOCK_NONLOCALIZED_DECLS or all frontends consistently need to put a
> decl copy in BLOCK_VARS for the sake of debuginfo (still using the
> global-scope decl for the actual call) - that is what the C frontend
> is doing and that works quite well.
> 
> Jason?  Can we please change the C++ frontend to mimic what the C
> frontend does here?  See c-decl.c:1199ff.
> 
> I'm testing another (temporary?) workaround, still prone to the above
> issue.

And it exactly shows the issue during LTO bootstrap with

`is_cpp_driver' referenced in section `.text' of
/tmp/ccNdxpcJ.ltrans15.ltrans.o: defined in discarded section `.text' of gcc.o
(symbol from plugin)
collect2: error: ld returned 1 exit status
make[3]: *** [cpp] Error 1

:(


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]