[llvm-commits] CVS: llvm-gcc/gcc/c-common.c
Chris Lattner
lattner at cs.uiuc.edu
Mon Jan 3 14:01:37 PST 2005
Changes in directory llvm-gcc/gcc:
c-common.c updated: 1.3 -> 1.4
---
Log message:
Fix an infinite loop in my change to c-typeck.c
---
Diffs of the changes: (+4 -1)
Index: llvm-gcc/gcc/c-common.c
diff -u llvm-gcc/gcc/c-common.c:1.3 llvm-gcc/gcc/c-common.c:1.4
--- llvm-gcc/gcc/c-common.c:1.3 Thu Feb 5 10:05:44 2004
+++ llvm-gcc/gcc/c-common.c Mon Jan 3 16:01:22 2005
@@ -44,6 +44,9 @@
#include "toplev.h"
#include "llvm-out.h"
+struct initializer_stack;
+extern struct initializer_stack *initializer_stack;
+
cpp_reader *parse_in; /* Declared in c-pragma.h. */
/* We let tm.h override the types used here, to handle trivial differences
@@ -2562,7 +2565,7 @@
TREE_UNSIGNED (sizetype)), intop);
/* Don't create an ARRAY_REF if this is a potentially a static initializer. */
- if (EMIT_LLVM && (!TREE_CONSTANT (ptrop) || !TREE_CONSTANT(intop))) {
+ if (EMIT_LLVM && !initializer_stack) {
/* In LLVM we really want to represent this as &P[i], not as P+i*sizeof(*P)
*/
tree arrayref;
More information about the llvm-commits
mailing list