c/351: gcc 20000626 C tree-checking ICE with -pedantic

Joseph Myers jsm28@cam.ac.uk
Tue Jun 27 05:06:00 GMT 2000


>Number:         351
>Category:       c
>Synopsis:       gcc 20000626 C tree-checking ICE with -pedantic
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          ice-on-illegal-code
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 27 05:06:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Joseph S. Myers
>Release:        2.96
>Organization:
none
>Environment:
System: Linux decomino 2.2.16 #1 Thu Jun 8 00:26:22 UTC 2000 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
>Description:

The following code gives an internal compiler error when compiled with
`gcc -pedantic -c', GCC snapshot 20000626.

================================================================
struct s { char c[1]; };

extern struct s foo (void);

void
bar (void)
{
  (foo ()).c[0];
}
================================================================

>How-To-Repeat:

$ gcc -pedantic -c t.c
t.c: In function `bar':
t.c:8: Tree check: expected class 'd', have 'r' (component_ref)
t.c:8: Internal compiler error in `build_array_ref', at c-typeck.c:1320
Please submit a full bug report.
See <URL: http://www.gnu.org/software/gcc/bugs.html > for instructions.

>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the Gcc-prs mailing list