[Bug tree-optimization/71104] [7 Regression] ICE: verify_ssa failed (with vfork / error: definition in block 3 does not dominate use in block 7 )
rguenther at suse dot de
gcc-bugzilla@gcc.gnu.org
Thu Jul 14 10:04:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71104
--- Comment #17 from rguenther at suse dot de <rguenther at suse dot de> ---
On Thu, 14 Jul 2016, bernd.edlinger at hotmail dot de wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71104
>
> --- Comment #16 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
> (In reply to rguenther@suse.de from comment #15)
> > On Thu, 14 Jul 2016, bernd.edlinger at hotmail dot de wrote:
> >
> > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71104
> > >
> > > --- Comment #14 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
> > > One question though...
> > >
> > > This depends on a special knowledge about "vfork",
> > > but it seems that gcc does not honor -ffreestanding
> > > correctly in this case, because:
> > >
> > > gcc -ffreestanding pr71104-1.c
> > >
> > > should not have crashed (before your patch, but it did).
> >
> > Even with -ffreestanding we handle some functions conservatively.
> > See special_function_p.
>
> Oh, I see.
> Handling vfork that may be conservative, but longjmp is not conservative.
Yeah, returning ECF_NORETURN isn't conservative. OTOH this code
only looking at the name of the function rather than using the
corresponding builtin pre-dates my GCC involvement.
Can you open a separate bug please?
>
> test.c:
>
> void foo(void);
> int longjmp(void);
> int *p;
>
> void bar(void)
> {
> foo();
> *p = longjmp();
> }
>
> gcc -Wall -S -O3 -ffreestanding test.c
> gives zero warning, and invalid code:
>
> bar:
> .LFB0:
> .cfi_startproc
> subq $8, %rsp
> .cfi_def_cfa_offset 16
> call foo
> call longjmp
> .cfi_endproc
>
>
More information about the Gcc-bugs
mailing list