The attached preprocessed source code is an example of a recent regresion of the C++ frontend which totally *kills* Boost: test rate dropped from 90% to 9% because of this! This used to work like 2 weeks ago...
Created attachment 8288 [details] Preprocessed source (to be reduced)
Easy reduction: template <class T, T i> class b {}; template <class T, T i> class a { static const T value = i; b<T, static_cast<T>(value+1) > next; };
This worked with 4.0.0 20050113 but fails with 20050210.
I forgot to thank Martin Wille for notifying me of this bug and providing me with this testcase.
(In reply to comment #3) > This worked with 4.0.0 20050113 but fails with 20050210. To get a smaller window, it fails with 20050201. Hmm, it passes with 20050225. I think this was fixed by: PR c++/19991 * init.c (integral_constant_value): Iterate if the value of a decl is itself a constant. Since this is fixed both the orginal full test case and the reduced version, I am going to close it as fixed. Giovanni if you want to apply the testcase I think that would be useful for the future.
*** Bug 20261 has been marked as a duplicate of this bug. ***