Reverted incorrectly applied change
authorTom Tromey <tromey@gcc.gnu.org>
Fri, 19 May 2000 16:10:55 +0000 (16:10 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Fri, 19 May 2000 16:10:55 +0000 (16:10 +0000)
From-SVN: r34023

gcc/java/parse.c
gcc/java/parse.y

index e7d5c94c49223e49f5d4d47240440ed97621a294..e6bf159502b39108a55adeea6b2bc1915c99abe8 100644 (file)
@@ -17225,6 +17225,8 @@ fold_constant_for_init (node, context)
 
   if (code == INTEGER_CST || code == REAL_CST)
     return convert (TREE_TYPE (context), node);
+  if (TREE_TYPE (node) != NULL_TREE && code != VAR_DECL && code != FIELD_DECL)
+    return NULL_TREE;
 
   switch (code)
     {
index 2ac64090b32aa010a8d7c013a50a2240b98523c6..c62e8410a03da3cf9d3dea7582871f22eb4b27c0 100644 (file)
@@ -14593,6 +14593,8 @@ fold_constant_for_init (node, context)
 
   if (code == INTEGER_CST || code == REAL_CST)
     return convert (TREE_TYPE (context), node);
+  if (TREE_TYPE (node) != NULL_TREE && code != VAR_DECL && code != FIELD_DECL)
+    return NULL_TREE;
 
   switch (code)
     {