https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66015
Bug ID: 66015 Summary: align directives not propagated after __attribute__ ((__optimize__ ("O2"))) Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: chrbr at gcc dot gnu.org Target Milestone: --- When attribute optimize is used, the alignment flags are not reevaluated. Consequently, the functions are not aligned as if they were with the same global flag for example: __attribute__ ((__optimize__ ("O2"))) void hooray () { } is not aligned The second consequence is that can_inline_edge_p fails because opts_for_fn (caller->decl) != opts_for_fn (callee->decl)) even-though they are compiled with the same optimization level.