[Bug testsuite/90331] New test case gcc.dg/pr87314-1.c fails

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon May 6 07:34:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90331

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2019-05-06
          Component|middle-end                  |testsuite
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Hmm, GIMPLE has

;; Function h (null)
;; enabled by -tree-original


{
  return (char *) "bye" == (char *) "hellobye" + 5;

but somehow on ppc64le CCP elides the check.  Hmm, it might be due to
how the target aligns constants.  Indeed "fixing" the testcase shows:

        .section        .rodata.str1.8,"aMS",@progbits,1
        .align 3
.LC0:
        .string "helloooobye"
        .align 3
.LC1:
        .string "bye"
        .section        ".toc","aw"

...

so ppc64le (and possibly others) align (even small) strings to 8 bytes,
also somewhat defeating string merging.


More information about the Gcc-bugs mailing list