This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Fix for failure to build glibc
- From: law at redhat dot com
- To: Andreas Jaeger <aj at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org, Diego Novillo <dnovillo at redhat dot com>
- Date: Thu, 08 May 2003 13:58:43 -0600
- Subject: Re: [tree-ssa] Fix for failure to build glibc
- Reply-to: law at redhat dot com
In message <ho4r453ca2.fsf@byrd.suse.de>, Andreas Jaeger writes:
>dl-deps.c: In function `_dl_map_object_deps':
>dl-deps.c:240: error: continue statement not within loop or switch
>dl-deps.c:285: error: continue statement not within loop or switch
>dl-deps.c: At top level:
>../stdio-common/_itoa.h:40: warning: inlining failed in call to `_itoa_word'
>dl-deps.c:76: warning: called from here
>make[2]: *** [/usr/src/aj/build/libc/tree-ssa/elf/dl-deps.o] Error 1
>
>This is wrong, the continue is in a for loop. I'm appending
>preprocessed source code.
Thanks. Somehow we managed to totally skip simplifying the
underlying statements in the EXPR_STMT. We walked back down the
tree later but didn't have the context necessary to deal with
the break/continue statements and blam, bad things happened.
Anyway, this ought to fix the problem.
* c-simplify.c (simplify_expr_stmt): Make sure to
simplify the body of the EXPR_STMT.
Index: c-simplify.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/c-simplify.c,v
retrieving revision 1.1.4.52
diff -c -3 -p -r1.1.4.52 c-simplify.c
*** c-simplify.c 7 May 2003 13:27:35 -0000 1.1.4.52
--- c-simplify.c 8 May 2003 19:55:37 -0000
*************** simplify_expr_stmt (stmt_p)
*** 496,501 ****
--- 496,505 ----
}
}
+ /* Make sure to simplify the body of the statement expression. */
+ simplify_stmt (&EXPR_STMT_EXPR (*stmt_p));
+ stmt = EXPR_STMT_EXPR (*stmt_p);
+
if (stmts_are_full_exprs_p ())
stmt = build1 (CLEANUP_POINT_EXPR, void_type_node, stmt);
*stmt_p = stmt;