This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/37669] [4.4 Regression] ice for legal code with -O2
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Oct 2008 14:02:49 -0000
- Subject: [Bug middle-end/37669] [4.4 Regression] ice for legal code with -O2
- References: <bug-37669-9596@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #19 from jakub at gcc dot gnu dot org 2008-10-20 14:02 -------
As arg_mask is only 1, 2 or 4, the fix could be e.g. just break at the end of
if ((arg_mask >> i) & 1) body, or changing the for condition to i < nargs && i
<= 31. But if the former, we might as well turn arg_mask into arg_index, we
never set more than 1 bit in it, and not loop at all.
The loop made sense in 4.2 and earlier where we had to walk the tree chain to
get at the arguments, now we have an array, so all we need is verify we have
enough arguments (assert should be enough, otherwise it wouldn't be a builtin?)
and just call get_maxval_strlen on the right argument.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37669