This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug debug/48967] New: [4.6/4.7 Regression] ICE during use_narrower_mode


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

           Summary: [4.6/4.7 Regression] ICE during use_narrower_mode
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: jakub@gcc.gnu.org
        ReportedBy: jakub@gcc.gnu.org
            Target: powerpc64-linux


Created attachment 24224
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24224
rh703888.ii

The attached testcase ICEs in 4.6 and 4.7 with -O2 -g -m64.
The problem is that lowpart_subreg returns NULL, as a SImode subreg of DImode
register 32 (fp0) isn't allowed.

--- var-tracking.c.jj 2011-04-13 14:04:00.000000000 +0200
+++ var-tracking.c 2011-05-11 18:05:41.000000000 +0200
@@ -739,6 +739,10 @@ use_narrower_mode_test (rtx *loc, void *
     case REG:
       if (cselib_lookup (*loc, GET_MODE (SUBREG_REG (subreg)), 0, VOIDmode))
         return 1;
+      if (!validate_subreg (GET_MODE (subreg), GET_MODE (*loc),
+                            *loc, subreg_lowpart_offset (GET_MODE (subreg),
+                                                         GET_MODE (*loc))))
+        return 1;
       return -1;
     case PLUS:
     case MINUS:

seems to fix this and doesn't seem to ever trigger in x86_64-linux bootstrap
(this optimization has been added mainly for x86_64).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]