From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Buck To: mrs@windriver.com (mike stump) Cc: gcc@gcc.gnu.org, jbuck@synopsys.COM, lerdsuwa@users.sourceforge.net Subject: Re: fix for PR 4447: is this really correct? Date: Fri, 30 Nov 2001 16:20:00 -0000 Message-ID: <200112010020.QAA13548@atrus.synopsys.com> References: <200111302321.PAA17355@kankakee.wrs.com> X-SW-Source: 2001-11/msg01662.html Message-ID: <20011130162000.e7se2j_DMre6CcFfw7h-QVKtILa0A-1PFhEBvt-rN3c@z> I wrote: > > Mark approved, assuming the usual testing requirements are met. Mike Stump writes: > :-( Note that this is already in the trunk, and I'm temporarily withdrawing my request to put this into 3.0.3 until we understand the consequences better. I overcame the temptation to slip it in anyway. :-) > > I've now verified that this fix doesn't break any C++ or libstdc++ > > tests (other tests aren't relevant since this only affects cc1plus). > > If I understand the fix, it is worse than not having it, as it hides a > real bug? Well, there is a bug that is being hidden, but that's not the same as saying that it's worse than not having the fix. The problem is that there's no way to work around this ICE without degrading performance in my application (attempting to speed up a class library that does fixed-point arithmetic). > > But I am now not sure that this fix is quite correct, though it does > > improve things. > > I think the ICE is preferable, as otherwise you have to explain that > you have to break the ABI, which is worse. I'd prefer to have neither the ICE nor the ABI breakage, but I'd prefer the latter to the former. > > on Solaris gives > > > 0000000000 T foo(T, T) > > 0000000000 T T<(true)&&(true), ((3)+(4))-(operator int((true)&&(true)))> func(T, T) > > Ick! Looks like a bug. Yes. Maybe it's possible to fix the bug by applying a constant-folding operation to template arguments before the mangler is called. > > Comments? I may still want this for 3.0.3, because it does make > > some cases that ICE'd before work correctly > > Is that working correctly? I don't think so. From an, I don't care > about the abi, yes, it works fine, but from an, gosh, what do you mean > you totally broke the abi, I thought you said you weren't going to do > that, it looks like absolute horror. News flash: 3.1 will have a couple of minor ABI bug fixes, so it seems that we're already in a position to break the ABI, despite our promise. The cases in question are corner cases, so they may not have a substantial effect, but they exist. In this case, the generated symbol will be exactly the symbol that is called, so even if the bug is fixed I think that a 3.0 <-> 3.1+fix link will work.