Summary: | WHOPR doesn't grok empty units | ||
---|---|---|---|
Product: | gcc | Reporter: | Richard Biener <rguenth> |
Component: | lto | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gcc-bugs, rwild |
Priority: | P3 | Keywords: | ice-on-valid-code, lto |
Version: | 4.5.0 | ||
Target Milestone: | 4.6.0 | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2010-04-08 11:09:52 |
Description
Richard Biener
2009-10-05 12:56:21 UTC
*** Bug 43609 has been marked as a duplicate of this bug. *** Same happens with cat >a.c <<\EOF int i = 42; EOF or with cat >a.c <<\EOF int foo; int *i = &foo; EOF Interestingly, LTO actually tries to use the original file name: /* Since SET does not need to be processed by LTRANS, use the original file name and mark it with a '*' prefix so that lto_execute_ltrans knows not to process it. */ cgraph_node_set_iterator si = csi_start (set); struct cgraph_node *first = csi_node (si); fname = prefix_name_with_star (first->local.lto_file_data->file_name); But it tries to take the file name from the first node in the call graph. And the reason why we try re-use the original file name, is because the call graph is empty. Strange logic... Maybe WHOPR should give a fatal error if the only set is empty. Well, or just use some default name of the unit ;) Fixed. Subject: Bug 41584 Author: rguenth Date: Thu Jun 3 14:22:46 2010 New Revision: 160223 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160223 Log: 2010-06-03 Richard Guenther <rguenther@suse.de> PR lto/41584 * gcc.dg/lto/20100603-1_0.c: New testcase. * gcc.dg/lto/20100603-2_0.c: Likewise. * gcc.dg/lto/20100603-3_0.c: Likewise. Added: trunk/gcc/testsuite/gcc.dg/lto/20100603-1_0.c trunk/gcc/testsuite/gcc.dg/lto/20100603-2_0.c trunk/gcc/testsuite/gcc.dg/lto/20100603-3_0.c Modified: trunk/gcc/testsuite/ChangeLog Subject: Bug 41584 Author: rguenth Date: Fri Jun 4 11:00:09 2010 New Revision: 160258 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160258 Log: 2010-06-04 Richard Guenther <rguenther@suse.de> PR lto/41584 * cgraph.h (struct varpool_node): Add lto_file_data field. * lto-cgraph.c (input_varpool_node): Initialize it. lto/ * lto.c (lto_1_to_1_map): Use the proper file_data for varpool nodes. Modified: trunk/gcc/ChangeLog trunk/gcc/cgraph.h trunk/gcc/lto-cgraph.c trunk/gcc/lto/ChangeLog trunk/gcc/lto/lto.c |