Message ID | 4562296.0Pgz1dnq1l@polaris |
---|---|
State | New |
Headers | show |
Index: gcc-interface/utils2.c =================================================================== --- gcc-interface/utils2.c (revision 221407) +++ gcc-interface/utils2.c (working copy) @@ -2805,6 +2805,12 @@ gnat_invariant_expr (tree expr) expr = remove_conversions (expr, false); } + /* We are only interested in scalar types at the moment and, even if we may + have gone through padding types in the above loop, we must be back to a + scalar value at this point. */ + if (AGGREGATE_TYPE_P (TREE_TYPE (expr))) + return NULL_TREE; + if (TREE_CONSTANT (expr)) return fold_convert (type, expr);