This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] Failure with contained functions


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]