[Bug lto/40765] [LTO] ICE verify_ssa failed

2009-07-17 Thread rguenth at gcc dot gnu dot org


--- Comment #5 from rguenth at gcc dot gnu dot org  2009-07-17 17:42 ---
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug lto/40765] [LTO] ICE verify_ssa failed

2009-07-17 Thread rguenth at gcc dot gnu dot org


--- Comment #4 from rguenth at gcc dot gnu dot org  2009-07-17 17:41 ---
Subject: Bug 40765

Author: rguenth
Date: Fri Jul 17 17:41:38 2009
New Revision: 149753

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149753
Log:
2009-07-17  Richard Guenther  

PR lto/40765
* lto-symtab.c (lto_symtab_merge_decl): Merge TREE_ADDRESSABLE
state.

* gcc.dg/lto/20090717_0.c: New testcase.
* gcc.dg/lto/20090717_1.c: Likewise.

Added:
branches/lto/gcc/testsuite/gcc.dg/lto/20090717_0.c
branches/lto/gcc/testsuite/gcc.dg/lto/20090717_1.c
Modified:
branches/lto/gcc/ChangeLog.lto
branches/lto/gcc/lto-symtab.c
branches/lto/gcc/testsuite/ChangeLog.lto


-- 


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



[Bug lto/40765] [LTO] ICE verify_ssa failed

2009-07-17 Thread rguenth at gcc dot gnu dot org


--- Comment #3 from rguenth at gcc dot gnu dot org  2009-07-17 15:40 ---
confvar.i:

struct variable {
const char *string;
};
struct variable table[] = { };


getconf.i:

struct variable {
const char *string;
};
extern struct variable table[];
int main(int argc, char *argv[]) 
{
struct variable *p;
for(p = table; p->string; p++) 
  ;
}

> ./xgcc -B.  confvar.3.i getconf.3.i -flto -O
In function 'main':
lto1: error: address taken, but ADDRESSABLE bit not set
PHI argument
&table[0];
for PHI node
p_1 = PHI <&table[0](2), p_4(3)>
lto1: internal compiler error: verify_ssa failed
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

as table is a global variable this is likely just a verifier issue - the
TREE_ADDRESSABLE state of non-static variables is not relevant (still it
seems it's not properly merged).  With -fwhole-program table should be
promoted to static, thus TREE_ADDRESSABLE should be merged here.

Like the following, which fixes the testcase:

Index: lto-symtab.c
===
--- lto-symtab.c(revision 149739)
+++ lto-symtab.c(working copy)
@@ -572,6 +572,9 @@ lto_symtab_merge_decl (tree new_decl,
   if (!lto_symtab_compatible (old_decl, new_decl))
 return;

+  /* Merge decl state.  */
+  TREE_ADDRESSABLE (old_decl) |= TREE_ADDRESSABLE (new_decl);
+
   old_resolution = lto_symtab_get_resolution (old_decl);
   gcc_assert (resolution != LDPR_UNKNOWN
  && resolution != LDPR_UNDEF


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2009-07-15 15:15:34 |2009-07-17 15:40:25
   date||


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



[Bug lto/40765] [LTO] ICE verify_ssa failed

2009-07-15 Thread rguenth at gcc dot gnu dot org


--- Comment #2 from rguenth at gcc dot gnu dot org  2009-07-15 15:15 ---
Confirmed.  Maybe as well LTO unrelated.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2009-07-15 15:15:34
   date||


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



[Bug lto/40765] [LTO] ICE verify_ssa failed

2009-07-15 Thread rmansfield at qnx dot com


--- Comment #1 from rmansfield at qnx dot com  2009-07-15 11:44 ---
Created an attachment (id=18201)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18201&action=view)
preprocessed source


-- 


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