[Bug c++/57489] [4.8 regression]: invalid code generated for conditional in template function

jhand at austin dot rr.com gcc-bugzilla@gcc.gnu.org
Fri May 31 20:53:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57489

--- Comment #1 from Jim Hand <jhand at austin dot rr.com> ---
One of my coworkers looked at the assembly and said that it appears g++ isn't
even generating code for the conditional "if (expected_v != actual_v ||
expected_i != actual_i)" when this occurs. It appears the compiler is analyzing
the inline code and determining that the conditional isn't required. Testing
with some smaller numbers seems to cause the conditional to be generated.

With a number of 9223372036854775759 or less, the conditional seems to work as
expected.

Good luck with this one!



More information about the Gcc-bugs mailing list