+2006-08-11 Eric Botcazou <ebotcazou@adacore.com>
+
+ * tree.c (build1_stat): Also propagate the TREE_CONSTANT and
+ TREE_INVARIANT flags for a VIEW_CONVERT_EXPR.
+
2006-08-10 Paul Brook <paul@codesourcery.com>
* final.c (final_scan_insn): Clear current_insn_predicate before
+2006-08-10 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/specs/static_initializer.ads: New test.
+
2006-08-10 Paul Brook <paul@codesourcery.com>
* gcc.target/arm/cond-asm.c: New test.
--- /dev/null
+-- { dg-do compile }
+
+package static_initializer is
+
+ type Vector is array (1 .. 3) of Float;
+ type Arr is array (Integer range 1 .. 3) of Vector;
+
+ Pos : constant Arr := ((0.0, 1.0, 2.0),
+ (0.5, 1.5, 2.5),
+ (1.0, 2.0, 4.0));
+
+end;
+
+-- { dg-final { scan-assembler-not "elabs" } }
break;
default:
- if (TREE_CODE_CLASS (code) == tcc_unary
+ if ((TREE_CODE_CLASS (code) == tcc_unary || code == VIEW_CONVERT_EXPR)
&& node && !TYPE_P (node)
&& TREE_CONSTANT (node))
TREE_CONSTANT (t) = 1;
- if (TREE_CODE_CLASS (code) == tcc_unary
+ if ((TREE_CODE_CLASS (code) == tcc_unary || code == VIEW_CONVERT_EXPR)
&& node && TREE_INVARIANT (node))
TREE_INVARIANT (t) = 1;
if (TREE_CODE_CLASS (code) == tcc_reference