This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Failure with contained functions
- From: law at redhat dot com
- To: Paul Brook <paul at nowt dot org>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, Diego Novillo <dnovillo at redhat dot com>
- Date: Sun, 15 Jun 2003 10:29:24 -0600
- Subject: Re: [tree-ssa] Failure with contained functions
- Reply-to: law at redhat dot com
In message <200306142043.57575.paul@nowt.org>, Paul Brook writes:
>The following program miscompiles on the tree-ssa branch at -O1 and -O2.
>
>int main()
>{
> int a;
> void test(int i)
> {
> a = i;
> };
> a = 0;
> test (42);
> if (a != 42)
> abort ();
> return 0;
>}
>
>It looks like the ssa pass doesn't know about contained functions, and
>misses the redefinition of a inside the contained function.
Nested functions present a variety of nasty problems and I've got an
entry on my todo stack to deal with them (I need to fix some problems
with nested functions so that I can safely eliminate unnecessary
variables before we run the tree->rtl expanders).
If you wouldn't mind, could you change the "return 0" to "exit (0)" and
check that test in to the testsuite to make sure it gets addressed?
Thanks,
jeff