-
- Downloads
tree.h (categorize_ctor_elements): Adjust prototype and add descriptive comment...
* tree.h (categorize_ctor_elements): Adjust prototype and add descriptive comment, both in accordance with the interface change described below. * varasm.c (constructor_static_from_elts_p): New function. Whether a constructor node is a valid static constant initializer if all its elements are. (initializer_constant_valid_p) <CONSTRUCTOR value>: Use it. * output.h: Declare it. * expr.c (categorize_ctor_elements_1): Return whether the constructor is a valid constant initializer instead of computing the number of non-constant elements. Use constructor_static_from_elts_p for this purpose. Replace the head comment with an indication that this is a helper for categorize_ctor_elements. (categorize_ctor_elements): Same interface change as for the _1 helper. Former head comment from this helper moved here, adjusted to account for the interface changes. (mostly_zeros_p): Adjust call to categorize_ctor_elements. (all_zeros_p): Likewise. * gimplify.c (gimplify_init_constructor): Decide whether we can make static versions of the constructor from the categorize_ctor_elements return value instead of the formerly computed number of non-constant elements. * gnat.dg/outer_agg_bitfield_constructor.adb: New test. * gnat.dg/nested_agg_bitfield_constructor.adb: New test. From-SVN: r115553
Showing
- gcc/ChangeLog 25 additions, 0 deletionsgcc/ChangeLog
- gcc/expr.c 43 additions, 29 deletionsgcc/expr.c
- gcc/gimplify.c 10 additions, 7 deletionsgcc/gimplify.c
- gcc/output.h 7 additions, 0 deletionsgcc/output.h
- gcc/testsuite/ChangeLog 5 additions, 0 deletionsgcc/testsuite/ChangeLog
- gcc/testsuite/gnat.dg/nested_agg_bitfield_constructor.adb 34 additions, 0 deletionsgcc/testsuite/gnat.dg/nested_agg_bitfield_constructor.adb
- gcc/testsuite/gnat.dg/outer_agg_bitfield_constructor.adb 44 additions, 0 deletionsgcc/testsuite/gnat.dg/outer_agg_bitfield_constructor.adb
- gcc/tree.h 14 additions, 2 deletionsgcc/tree.h
- gcc/varasm.c 15 additions, 4 deletionsgcc/varasm.c
Loading
Please register or sign in to comment