While looking at PR55403 one has to wonder where the unaligned complex long double type came from in the first place: #0 copy_node_stat (node=0x7ffff1aeb9d8) at ../../git-master/gcc/tree.c:961 #1 0x0000000000e33162 in build_distinct_type_copy (type=0x7ffff1aeb9d8) at ../../git-master/gcc/tree.c:5856 #2 0x0000000000e332d5 in build_variant_type_copy (type=0x7ffff1aeb9d8) at ../../git-master/gcc/tree.c:5890 #3 0x0000000000e33119 in build_aligned_type (type=0x7ffff1aeb9d8, align=8) at ../../git-master/gcc/tree.c:5842 #4 0x0000000000a39b7d in ipa_modify_call_arguments (cs=0x7ffff11493a8, stmt=0x7ffff1147428, adjustments=...) at ../../git-master/gcc/ipa-prop.c:2967 I'm still not quite sure why ipa_modify_call_arguments *ever* wants to create misaligned types as function interfaces?
The call to get_pointer_alignment_1 at ipa-prop.c:2959 does not do what the author intended. In particular we really really need to notice the "false" return value when the results are conservative, and do nothing.
I'm looking into this.
Possibly related to PR55448.
I have proposed a patch on the mailing list: http://gcc.gnu.org/ml/gcc-patches/2012-11/msg02265.html
Author: jamborm Date: Fri Nov 30 16:11:33 2012 New Revision: 193998 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193998 Log: 2012-11-30 Martin Jambor <mjambor@suse.cz> PR middle-end/52890 PR tree-optimization/55415 PR tree-optimization/54386 PR target/55448 * ipa-prop.c (ipa_modify_call_arguments): Be optimistic when get_pointer_alignment_1 returns false and the base was not a dereference. * tree-sra.c (access_precludes_ipa_sra_p): New parameter req_align, added check for required alignment. Update the user. * testsuite/gcc.dg/ipa/ipa-sra-7.c: New test. * testsuite/gcc.dg/ipa/ipa-sra-8.c: Likewise. * testsuite/gcc.dg/ipa/ipa-sra-9.c: Likewise. * testsuite/gcc.target/i386/pr55448.c: Likewise. Added: trunk/gcc/testsuite/gcc.dg/ipa/ipa-sra-7.c trunk/gcc/testsuite/gcc.dg/ipa/ipa-sra-8.c trunk/gcc/testsuite/gcc.dg/ipa/ipa-sra-9.c trunk/gcc/testsuite/gcc.target/i386/pr55448.c Modified: trunk/gcc/ChangeLog trunk/gcc/ipa-prop.c trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-sra.c
Duplicate. A fixed one, fortunately. *** This bug has been marked as a duplicate of bug 54386 ***