Bug 33017 - [4.3 Regression] tree check fail for legal code
Summary: [4.3 Regression] tree check fail for legal code
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.3.0
: P1 normal
Target Milestone: 4.3.0
Assignee: Jakub Jelinek
URL: http://gcc.gnu.org/ml/gcc-patches/200...
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-07 21:41 UTC by David Binderman
Modified: 2007-09-04 23:35 UTC (History)
3 users (show)

See Also:
Host: x86_64-suse-linux
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2007-09-03 19:35:25


Attachments
C source code (56.26 KB, text/plain)
2007-08-07 21:43 UTC, David Binderman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2007-08-07 21:41:39 UTC
I just tried to compile Suse Linux package ddiwrapper-0.2-86
with the GNU C compiler version 4.3 snapshot 20070803.

The compiler said

write_msft.c: In function 'ctl2_alloc_string':
write_msft.c:562: internal compiler error: tree check: expected ssa_name, have symbol_memory_tag in is_old_name, at tree-into-ssa.c:566
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

Preprocessed source attached. Flags -O2   -ftree-vectorize -m32 required.
Comment 1 David Binderman 2007-08-07 21:43:27 UTC
Created attachment 14037 [details]
C source code
Comment 2 Andrew Pinski 2007-08-08 09:18:22 UTC
Reducing.
Comment 3 Andrew Pinski 2007-08-08 14:35:20 UTC
Here is a reduced testcase:
int ctl2_encode_string(
 const char *string,
 char **result)
{
    int length;
    static char converted_string[0x104];
    int offset;
    length = strlen(string);
    for(offset = 0; offset < 4; offset++)
      converted_string[length + offset + 2] = 0x57; 
}
Comment 4 Jakub Jelinek 2007-09-04 23:30:17 UTC
Subject: Bug 33017

Author: jakub
Date: Tue Sep  4 23:29:58 2007
New Revision: 128107

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128107
Log:
	PR tree-optimization/33017
	* tree-data-ref.c (split_constant_offset) <case SSA_NAME>: Don't
	recurse for pure or const function calls.

	* gcc.dg/pr33017.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr33017.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-data-ref.c

Comment 5 Jakub Jelinek 2007-09-04 23:35:20 UTC
Fixed.