This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/71104] [7 Regression] ICE: verify_ssa failed (with vfork / error: definition in block 3 does not dominate use in block 7 )
- From: "bernd.edlinger at hotmail dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 14 Jul 2016 08:59:09 +0000
- Subject: [Bug tree-optimization/71104] [7 Regression] ICE: verify_ssa failed (with vfork / error: definition in block 3 does not dominate use in block 7 )
- Auto-submitted: auto-generated
- References: <bug-71104-4@http.gcc.gnu.org/bugzilla/>
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