[Bug tree-optimization/18291] New: 4.0: ICE in merge_alias_info
gcc-bugzilla at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Nov 3 20:43:00 GMT 2004
g++ 4.0 gives an ICE compiling the source below with -O1:
$ ./cc1plus -quiet -O1 x.cc
x.cc: In function 'void writeDigi()':
x.cc:10: internal compiler error: in merge_alias_info, at tree-ssa-copy.c:217
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
$
It's crashing at the abort() here:
212 if (new_ptr_info->name_mem_tag == NULL_TREE)
213 memcpy (new_ptr_info, orig_ptr_info, sizeof (*new_ptr_info));
214 else if (orig_ptr_info->name_mem_tag == NULL_TREE)
215 memcpy (orig_ptr_info, new_ptr_info, sizeof (*orig_ptr_info));
216 else if (orig_ptr_info->name_mem_tag != new_ptr_info->name_mem_tag)
217 abort ();
Here are the values that are being compared:
(gdb) p *orig_ptr_info
$5 = {pt_anything = 0, pt_malloc = 0, value_escapes_p = 0,
is_dereferenced = 1, pt_global_mem = 0, pt_vars = 0x400b18a0,
name_mem_tag = 0x400baef4}
(gdb) p *new_ptr_info
$6 = {pt_anything = 0, pt_malloc = 0, value_escapes_p = 0,
is_dereferenced = 1, pt_global_mem = 0, pt_vars = 0x400b1880,
name_mem_tag = 0x400bae80}
(gdb) call debug_tree( orig_ptr_info->name_mem_tag)
<var_decl 0x400baef4 NMT.4
type <integer_type 0x4002a4fc int public SI
size <integer_cst 0x400223d8 constant invariant 32>
unit size <integer_cst 0x40022168 constant invariant 4>
align 32 symtab 0 alias set -1 precision 32 min <integer_cst 0x40022390 -2147483648> max <integer_cst 0x400223a8 2147483647>
pointer_to_this <pointer_type 0x40038ef4>>
addressable used ignored SI file x.cc line 10 size <integer_cst 0x400223d8 32> unit size <integer_cst 0x40022168 4>
align 32 context <function_decl 0x400b8a6c writeDigi>>
(gdb) call debug_tree( new_ptr_info->name_mem_tag)
<var_decl 0x400bae80 NMT.3
type <integer_type 0x4002a4fc int public SI
size <integer_cst 0x400223d8 constant invariant 32>
unit size <integer_cst 0x40022168 constant invariant 4>
align 32 symtab 0 alias set -1 precision 32 min <integer_cst 0x40022390 -2147483648> max <integer_cst 0x400223a8 2147483647>
pointer_to_this <pointer_type 0x40038ef4>>
addressable used ignored SI file x.cc line 10 size <integer_cst 0x400223d8 32> unit size <integer_cst 0x40022168 4>
align 32 context <function_decl 0x400b8a6c writeDigi>>
Environment:
System: Linux karma 2.6.8.1 #20 Mon Sep 13 23:48:47 EDT 2004 i686 i686 i386 GNU/Linux
Architecture: i686
<machine, os, target, libraries (multiple lines)>
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: /home/sss/gcc/gcc/configure --prefix=/usr/local/gcc --enable-threads=posix --enable-long-long --enable-languages=c,c++,f95
How-To-Repeat:
Compile with -O1:
-------------------------------------------------
struct C
{
int size() const { return 0;}
};
int foo (int);
void writeDigi()
{
C strErgC;
int mcdigi ;
int* pmcdigi = &mcdigi ;
int mcdigi_crosstalk ;
if ( foo(0) )
pmcdigi = &mcdigi_crosstalk;
int mcdigi_elec_noise ;
if ( strErgC.size() > 0 )
{
foo(*pmcdigi );
pmcdigi = &mcdigi_elec_noise;
}
foo(*pmcdigi);
}
-------------------------------------------------
------- Additional Comments From snyder at fnal dot gov 2004-11-03 20:43 -------
Fix:
<how to correct or work around the problem, if known (multiple lines)>
--
Summary: 4.0: ICE in merge_alias_info
Product: gcc
Version: 0.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: snyder at fnal dot gov
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18291
More information about the Gcc-bugs
mailing list