------- Comment #4 from maxim at codesourcery dot com  2007-11-03 07:45 -------
Subject: Re:  [4.3 Regression] cc1 segfault with -O2
 -fsched-stalled-insns=0 for twolf

jakub at gcc dot gnu dot org wrote:
> ------- Comment #3 from jakub at gcc dot gnu dot org  2007-11-02 23:17 -------
> Fixed for ppc64.
> 
> I haven't added the requested stop at the start of bb, Maxim, if you want to
> do that, please go ahead.
> Also, I have just found that this testcase fails on ia64 native for a 
> different
> reason (wonder why I haven't reproduced that with cross ia64 before).
> On ia64 the problem is that the backend sets DO_SPECULATION in flags
> in ia64_set_sched_flags - mflag_sched_ar_data_spec is 1 by default and
> when user asks for -fsched-stalled-insns=5 (or =0), then
> /* Perform a few consistency checks of flags in different data structures.  */
> static void
> check_sched_flags (void)
> {
>   unsigned int f = current_sched_info->flags;
> 
>   if (flag_sched_stalled_insns)
>     gcc_assert (!(f & DO_SPECULATION));
>   if (f & DO_SPECULATION)
>     gcc_assert (!flag_sched_stalled_insns
>                 && spec_info
>                 && spec_info->mask);
> }
> fails.  It compiles with -O2 -fno-sched-stalled-insns or -O2
> -fsched-stalled-insns=0 -mno-sched-ar-data-spec
> I see no code that would try to do anything to satisfy this assert, should
> ia64 disallow -fsched-stalled-insns by setting flag_sched_stalled_insns = 0?
> Or if it is non-zero don't set DO_SPECULATION?  Something else?

I don't really remember why I enforced this check.  I believe, 
-fsched-stalled-insns doesn't make sense for ia64, but, anyway, if user 
wants to do that, compiler should deal with it.

There is no code in ia64 backend that will turn off either of the flags 
depending on presence of the other.  I think, this check (the whole 
function) should be simply removed, given that compiler won't ICE 
somewhere else.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33670

Reply via email to