* expmed.c (flip_storage_order): Deal with complex modes specially.
commitafa8d9397ae35ff4aca9b28c0e8c610b99c1292f
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 17 Jul 2015 09:29:31 +0000 (17 09:29 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 17 Jul 2015 09:29:31 +0000 (17 09:29 +0000)
treee3a6e491f286136540de77d9337cd87fd1f66062
parentb67af385afec80ec3960ad920eb072869e3dc474
* expmed.c (flip_storage_order): Deal with complex modes specially.
Use the precision of the mode instead of its size to find an integral
counterpart.
(extract_bit_field_1): Deal with complex modes specially.
* expr.c (read_complex_part): Make public.
(get_inner_reference): Call reverse_storage_order_for_component_p.
(expand_expr_real_1): Allow early exit for CONCATs as well.
* expr.h (read_complex_part): Declare.
* tree-dfa.c (get_ref_base_and_extent): Call
reverse_storage_order_for_component_p.
* tree.h (reverse_storage_order_for_component_p): New inline predicate.
ada/
* freeze.adb (Check_Component_Storage_Order): Skip a record component
if it has Complex_Representation.
(Freeze_Record_Type): If the type has Complex_Representation, skip
the regular treatment of Scalar_Storage_Order attribute and instead
issue a warning if it is present.
testsuite/
* c-c++-common/sso/init13.h: New helper.
* c-c++-common/sso/p13.c: New test.
* c-c++-common/sso/q13.c: Likewise.
* c-c++-common/sso/t13.c: Likewise.
* gnat.dg/sso/init13.ads: New helper.
* gnat.dg/sso/p13.adb: New test.
* gnat.dg/sso/q13.adb: Likewise.
* gnat.dg/sso/t13.adb: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/scalar-storage-order@225925 138bc75d-0d04-0410-961f-82ee72b054a4
19 files changed:
gcc/ada/freeze.adb
gcc/expmed.c
gcc/expr.c
gcc/expr.h
gcc/testsuite/c-c++-common/sso/init13.h [new file with mode: 0644]
gcc/testsuite/c-c++-common/sso/p13.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/sso/q13.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/sso/t13.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/990413-2.c
gcc/testsuite/gcc.c-torture/execute/bitfld-6.c
gcc/testsuite/gcc.c-torture/execute/bitfld-7.c
gcc/testsuite/gcc.c-torture/execute/comp-goto-1.c
gcc/testsuite/gcc.c-torture/execute/pr65401.c
gcc/testsuite/gnat.dg/sso/init13.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/sso/p13.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/sso/q13.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/sso/t13.adb [new file with mode: 0644]
gcc/tree-dfa.c
gcc/tree.h