2015-05-05 Christian Bruel PR target/66015 * config/ia64/ia64.c (ia64_option_override): Move align_loops, and align_functions into ia64_override_options_after_change. 2015-05-05 Christian Bruel PR target/66015 * gcc.target/ia64/iinline-attr-1.c: New test. Index: gcc/config/ia64/ia64.c =================================================================== --- gcc/config/ia64/ia64.c (revision 222803) +++ gcc/config/ia64/ia64.c (working copy) @@ -6051,10 +6051,6 @@ init_machine_status = ia64_init_machine_status; - if (align_functions <= 0) - align_functions = 64; - if (align_loops <= 0) - align_loops = 32; if (TARGET_ABI_OPEN_VMS) flag_no_common = 1; @@ -6066,6 +6062,11 @@ static void ia64_override_options_after_change (void) { + if (align_functions <= 0) + align_functions = 64; + if (align_loops <= 0) + align_loops = 32; + if (optimize >= 3 && !global_options_set.x_flag_selective_scheduling && !global_options_set.x_flag_selective_scheduling2) Index: gcc/testsuite/gcc.target/ia64/iinline-attr-1.c =================================================================== --- gcc/testsuite/gcc.target/ia64/iinline-attr-1.c (revision 0) +++ gcc/testsuite/gcc.target/ia64/iinline-attr-1.c (working copy) @@ -0,0 +1,28 @@ +/* Verify that alignment flags are set when attribute __optimize is used. */ +/* { dg-do compile } */ + +extern void non_existent(int); + +__attribute__ ((__optimize__ ("O2"))) +static void hooray () +{ + non_existent (1); +} + +__attribute__ ((__optimize__ ("O2"))) +static void hiphip (void (*f)()) +{ + non_existent (2); + f (); +} + +__attribute__ ((__optimize__ ("O2"))) +int test (void) +{ + hiphip (hooray); + return 0; +} + +/* { dg-final { scan-assembler ".align 64" } } */ + +