[Bug tree-optimization/71104] [7 Regression] ICE: verify_ssa failed (with vfork / error: definition in block 3 does not dominate use in block 7 )
bernd.edlinger at hotmail dot de
gcc-bugzilla@gcc.gnu.org
Thu Jul 14 08:59:00 GMT 2016
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.
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