Jan,

I was wondering if you could help me figure out how to fix the tests
g++.old-deja/g++.other/static14.C and g++.old-deja/g++.other/static20.C
which started failing on IA64 HP-UX at version 138150 when you checked
in the C++ inlining change.  Here is a minimal test:

   struct basic_string { ~basic_string() {} };
   struct Side { void name() { static basic_string sname; } };
   int main () { Side x; }

Before your checkin this would compile and link correctly,
now it gives me an undefined symbol for Side::name()::sname.

This bug only occurs when no optimization is used.

The difference is that before your change, the C++ cleanup function
_tcf_0 was not output (and was not called).  After the change this
cleanup function is output (though there are still no calls to it) and
it contains a reference to Side::name()::sname but the variable sname
is not output.  Interestingly, before and after the change, even though
the variable Side::name()::sname was not output, the guard variable for
it is output in a comdat.

If the test is optimized at all then the problem goes away because the
optimizer recognizes that _tcf_0 is not needed and doesn't output it and
thus the reference to Side::name()::sname goes away.

I don't see this problem on IA64 Linux where the _tcf_0 function
is not output even when no optimization is done.  I am not sure
why there is this difference between IA64 Linux and HP-UX.

Any help or advice you could give me would be appreciated.

Steve Ellcey
[EMAIL PROTECTED]

Reply via email to