Proposed location for variable sizes etc in ARRAY_REF and
Andrew Pinski
pinskia@physics.uc.edu
Mon Jun 28 00:36:00 GMT 2004
>
> On Sun, 27 Jun 2004, Andrew Pinski wrote:
> >> Unfortunately, the testcase from PR8361 still causes an ICE, regardless
> >> of the optimization setting, as soon as one specifies -Wall:
> >>
> >> % gccvs -c -Wall tmp/8361.ii
> >> In file included from dl.h:169,
> >> from generate.C:7:
> >> depgraph.h: In member function `void COMPONENT_FACTORY::preprocessComponents()':
> >> depgraph.h:647: internal compiler error: Segmentation fault
> >> Please submit a full bug report, with preprocessed source if appropriate.
> >>
> >> Richard, would you mind investigating again?
> > Well this is basically PR 16205.
>
> Are you sure? PR 8361 does not have any nothrows, at least in user code.
> If you have a fix for 16205, please let me know and I'll retest.
Yes the problem comes from RTH's changes to how warning for undefined sequence point.
Here is a simple patch which should fix the problem
I have not bootstrapped this or tested it on the testcase yet:
ChangeLog:
* c-common.c (warn_for_collisions_1): Warn for only decls which
have a name.
Index: c-common.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-common.c,v
retrieving revision 1.522
diff -u -p -r1.522 c-common.c
--- c-common.c 26 Jun 2004 21:11:08 -0000 1.522
+++ c-common.c 28 Jun 2004 00:20:31 -0000
@@ -1122,7 +1122,8 @@ warn_for_collisions_1 (tree written, tre
{
if (list->expr == written
&& list->writer != writer
- && (! only_writes || list->writer))
+ && (! only_writes || list->writer)
+ && DECL_NAME (list->expr))
{
warned_ids = new_tlist (warned_ids, written, NULL_TREE);
warning ("operation on `%s' may be undefined",
More information about the Gcc
mailing list