From faae4ae73f955ae9049f540fc7199e583a1d781e Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 18 Sep 2008 13:27:36 -0700 Subject: [PATCH] re PR target/37394 (Segfault in ia64_variable_issue with -O -fschedule-insns2) gcc/ 2008-09-18 H.J. Lu PR target/37394 * config/ia64/ia64.c (ia64_optimization_options): Move checking and setting flag_schedule_insns_after_reload and ia64_flag_schedule_insns2 back to ... (ia64_override_options): Here. gcc/testsuite/ 2008-09-18 H.J. Lu PR target/37394 * g++.dg/other/pr37394.C: New. From-SVN: r140475 --- gcc/ChangeLog | 8 ++++++++ gcc/config/ia64/ia64.c | 10 +++------- gcc/testsuite/ChangeLog | 13 +++++++++---- gcc/testsuite/g++.dg/other/pr37394.C | 12 ++++++++++++ 4 files changed, 32 insertions(+), 11 deletions(-) create mode 100644 gcc/testsuite/g++.dg/other/pr37394.C diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 25f2297ff5d9..37170cca50a7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2008-09-18 H.J. Lu + + PR target/37394 + * config/ia64/ia64.c (ia64_optimization_options): Move + checking and setting flag_schedule_insns_after_reload and + ia64_flag_schedule_insns2 back to ... + (ia64_override_options): Here. + 2008-09-18 Andrew Pinski PR rtl-opt/37451 diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index 28abf27d1bf8..81767bbf7c5b 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -5233,6 +5233,9 @@ ia64_override_options (void) TARGET_INLINE_SQRT = INL_MAX_THR; } + ia64_flag_schedule_insns2 = flag_schedule_insns_after_reload; + flag_schedule_insns_after_reload = 0; + ia64_section_threshold = g_switch_set ? g_switch_value : IA64_DEFAULT_GVALUE; init_machine_status = ia64_init_machine_status; @@ -9922,13 +9925,6 @@ void ia64_optimization_options (int level ATTRIBUTE_UNUSED, int size ATTRIBUTE_UNUSED) { - /* Disable the second machine independent scheduling pass and use one for the - IA-64. This needs to be here instead of in OVERRIDE_OPTIONS because this - is done whenever the optimization is changed via #pragma GCC optimize or - attribute((optimize(...))). */ - ia64_flag_schedule_insns2 = flag_schedule_insns_after_reload; - flag_schedule_insns_after_reload = 0; - /* Let the scheduler form additional regions. */ set_param_value ("max-sched-extend-regions-iters", 2); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ea13346e62c4..66f16b1e2d0d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,10 +1,15 @@ +2008-09-18 H.J. Lu + + PR target/37394 + * g++.dg/other/pr37394.C: New. + 2008-09-18 Paul Thomas - PR fortran/35945 - * gfortran.dg/host_assoc_types_2.f90: New test. + PR fortran/35945 + * gfortran.dg/host_assoc_types_2.f90: New test. - PR fortran/36700 - * gfortran.dg/host_assoc_call_2.f90: New test. + PR fortran/36700 + * gfortran.dg/host_assoc_call_2.f90: New test. 2008-09-18 DJ Delorie diff --git a/gcc/testsuite/g++.dg/other/pr37394.C b/gcc/testsuite/g++.dg/other/pr37394.C new file mode 100644 index 000000000000..7b5772e8efbf --- /dev/null +++ b/gcc/testsuite/g++.dg/other/pr37394.C @@ -0,0 +1,12 @@ +// Origin: Martin Michlmayr +// { dg-do compile { target ia64-*-* } } +// { dg-options "-O -fschedule-insns2" } + +struct _Words +{ + void *_M_pword; + _Words (): + _M_pword (0) + { + } +} _M_word_zero; -- 2.43.5