Richard Henderson - fix pr 29558 (original) (raw)

This is the mail archive of the gcc-patches@gcc.gnu.orgmailing 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]

The pr highlights a big problem with the var tracking code on big-endian systems. Namely, the REG_OFFSET information can be wrong/useless after reload has got done flattening paradoxical subregs. Namely, what once was

(subreg:SI (reg:QI 101 temp+0) 0)

becomes (reg:SI 11 temp+-3)

First, a -3 offset into a data structure is pointless. But second, even if we took big-endian things into account to try and resolve that, we've lost information: namely, the amount of data actually present in that register. It does us no good to see (reg:SI 11 temp+12), and say that there are 4 bytes of temp in reg11, if in fact there is only one byte of temp present, and it's offset is actually +15.

None of which can be fixed for the 4.2 branch. But at least we can fix the crash. In this case we had a TImode array in memory, and the test for "structures and arrays" didn't trigger.

Fixed thus, tested ppc64.

r~

    PR debug/29558
    * var-tracking.c (track_expr_p): Disallow AGGREGATE_TYPE_P
    in memory.

--- gcc/testsuite/gcc.dg/debug/pr29558.c (revision 122139) +++ gcc/testsuite/gcc.dg/debug/pr29558.c (local) @@ -0,0 +1,30 @@ +/* { dg-do compile } */ + +void stpi_unpack_16_1(int length, unsigned char *out, unsigned char bit) +{


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