* [Bug rtl-optimization/46337] dse.c:replace_inc_dec mis-use of gen_int_mode
2010-11-07 1:08 [Bug rtl-optimization/46337] New: dse.c:replace_inc_dec mis-use of gen_int_mode bigotp at acm dot org
@ 2010-11-07 9:57 ` mikpe at it dot uu.se
2010-11-07 10:18 ` ebotcazou at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mikpe at it dot uu.se @ 2010-11-07 9:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46337
Mikael Pettersson <mikpe at it dot uu.se> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikpe at it dot uu.se
--- Comment #1 from Mikael Pettersson <mikpe at it dot uu.se> 2010-11-07 09:56:41 UTC ---
Do you have a test case? That would greatly increase the chance of this fix
being added to the 4.4 branch.
(This is not the first error fixed by r146451 but not backported to 4.4, see
http://gcc.gnu.org/ml/gcc-patches/2009-07/msg01120.html for another one.)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug rtl-optimization/46337] dse.c:replace_inc_dec mis-use of gen_int_mode
2010-11-07 1:08 [Bug rtl-optimization/46337] New: dse.c:replace_inc_dec mis-use of gen_int_mode bigotp at acm dot org
2010-11-07 9:57 ` [Bug rtl-optimization/46337] " mikpe at it dot uu.se
@ 2010-11-07 10:18 ` ebotcazou at gcc dot gnu.org
2010-11-07 14:09 ` bigotp at acm dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2010-11-07 10:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46337
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2010.11.07 10:18:15
CC| |ebotcazou at gcc dot
| |gnu.org
Ever Confirmed|0 |1
--- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2010-11-07 10:18:15 UTC ---
> Do you have a test case? That would greatly increase the chance of this fix
> being added to the 4.4 branch.
Backporting the fix onto the 4.4 and 4.3 branches is OK, the current code
doesn't make any sense. But, yes, having a testcase would be better.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug rtl-optimization/46337] dse.c:replace_inc_dec mis-use of gen_int_mode
2010-11-07 1:08 [Bug rtl-optimization/46337] New: dse.c:replace_inc_dec mis-use of gen_int_mode bigotp at acm dot org
2010-11-07 9:57 ` [Bug rtl-optimization/46337] " mikpe at it dot uu.se
2010-11-07 10:18 ` ebotcazou at gcc dot gnu.org
@ 2010-11-07 14:09 ` bigotp at acm dot org
2010-11-29 9:08 ` ebotcazou at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: bigotp at acm dot org @ 2010-11-07 14:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46337
--- Comment #3 from Peter A. Bigot <bigotp at acm dot org> 2010-11-07 14:09:31 UTC ---
Created attachment 22308
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22308
Test case
This test case evokes the bug with the 16-bit msp430 target, which is not
integrated into gcc mainline. When built with -O2, the copy from cal into tcal
is converted into a series of five one-word moves. The copies for the values
at word offsets 2 (first half temperature_scale) and 4 (local_modbus_addr) are
apparently eliminated by some other optimization, but the copy for the last
half of temperature_scale hits the dse.c code.
In my case, I end up attempting to convert the value 5 to CCMode, instead of
the value 2 to HIMode, resulting in an ICE in trunc_int_for_mode at
explow.c:56.
I wasn't able to reproduce the ICE on a different architecture, and haven't
tried to check the generated code. Seems that it's pretty dependent on the
back end.
Hope this helps, and if not, that it's still ok to fix because it's clearly
wrong.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug rtl-optimization/46337] dse.c:replace_inc_dec mis-use of gen_int_mode
2010-11-07 1:08 [Bug rtl-optimization/46337] New: dse.c:replace_inc_dec mis-use of gen_int_mode bigotp at acm dot org
` (2 preceding siblings ...)
2010-11-07 14:09 ` bigotp at acm dot org
@ 2010-11-29 9:08 ` ebotcazou at gcc dot gnu.org
2010-11-29 9:09 ` ebotcazou at gcc dot gnu.org
2010-11-29 11:06 ` ebotcazou at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2010-11-29 9:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46337
--- Comment #4 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2010-11-29 08:57:56 UTC ---
Author: ebotcazou
Date: Mon Nov 29 08:57:53 2010
New Revision: 167235
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167235
Log:
PR rtl-optimization/46337
Backport from mainline
2009-04-20 Ian Lance Taylor <iant@google.com>
* dse.c (replace_inc_dec): Reverse parameters to gen_int_mode.
Modified:
branches/gcc-4_4-branch/gcc/ChangeLog
branches/gcc-4_4-branch/gcc/dse.c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug rtl-optimization/46337] dse.c:replace_inc_dec mis-use of gen_int_mode
2010-11-07 1:08 [Bug rtl-optimization/46337] New: dse.c:replace_inc_dec mis-use of gen_int_mode bigotp at acm dot org
` (3 preceding siblings ...)
2010-11-29 9:08 ` ebotcazou at gcc dot gnu.org
@ 2010-11-29 9:09 ` ebotcazou at gcc dot gnu.org
2010-11-29 11:06 ` ebotcazou at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2010-11-29 9:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46337
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.4.6
--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2010-11-29 08:59:43 UTC ---
Fixed on 4.4 branch.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug rtl-optimization/46337] dse.c:replace_inc_dec mis-use of gen_int_mode
2010-11-07 1:08 [Bug rtl-optimization/46337] New: dse.c:replace_inc_dec mis-use of gen_int_mode bigotp at acm dot org
` (4 preceding siblings ...)
2010-11-29 9:09 ` ebotcazou at gcc dot gnu.org
@ 2010-11-29 11:06 ` ebotcazou at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2010-11-29 11:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46337
--- Comment #6 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2010-11-29 11:03:07 UTC ---
Author: ebotcazou
Date: Mon Nov 29 11:03:03 2010
New Revision: 167238
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167238
Log:
PR rtl-optimization/46337
Backport from mainline
2009-04-20 Ian Lance Taylor <iant@google.com>
* dse.c (replace_inc_dec): Reverse parameters to gen_int_mode.
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/dse.c
^ permalink raw reply [flat|nested] 7+ messages in thread