This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug ipa/69990] [5/6 Regression] decl alignment not respected


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69990

--- Comment #5 from Alan Modra <amodra at gmail dot com> ---
I don't think we can make the decl with the larger alignment prevail.  Aren't
we stuck with "c" due to it being referenced by the constructor?

It goes like:
1) "c" is referenced in a constructor, thus make_decl_rtl for "c"
2) make_decl_rtl puts "c" in an anchor block,
3) anchor block contents can't move, so "c" alignment can't change,
4) "a" can be changed by ipa_increase_alignment, and the alias info isn't yet
available so there's no way to stop that happening,
5) "a" therefore must be prevented from aliasing "c".

I guess testing for exact equality of alignment is too strict, and I should
also allow an alias from smaller to larger alignment if the larger alignment is
a multiple of the smaller.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]