public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/104156] New: -fcompare-debug failure with -O3
@ 2022-01-21  4:57 cnsun at uwaterloo dot ca
  2022-01-21  8:17 ` [Bug tree-optimization/104156] [12 Regression] " pinskia at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: cnsun at uwaterloo dot ca @ 2022-01-21  4:57 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104156
           Summary: -fcompare-debug failure with -O3
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: cnsun at uwaterloo dot ca
  Target Milestone: ---

$ gcc-trunk -fcompare-debug -O3 small.c
gcc-trunk: error: small.c: ‘-fcompare-debug’ failure (length)
$ 
$ cat small.c
short a, d;
int b, c;
static int e() {
  int f = -2L, g = 9, h = 0;
  for (; h < 2; h++)
    if (a <= 5) {
      g = 0;
      if (c && a)
        break;
      if (c - 1)
        goto i;
    }
  if (b) {
    int *j[] = {&f};
    if (d)
      for (; f < 9; f++)
        if (g)
          for (; f; f++)
            ;
  i:
    while (f) {
      a--;
      break;
    }
  }
}
int main() { e(); }
$ 
$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /tmp/tmp.ahmEMGgtK2-gcc-builder/gcc/configure
--enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch
--prefix=/scratch/software/gcc-trunk --disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.1 20220120 (experimental) [master -g30f2c22de] (GCC) 
$

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-01-24  7:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-21  4:57 [Bug c/104156] New: -fcompare-debug failure with -O3 cnsun at uwaterloo dot ca
2022-01-21  8:17 ` [Bug tree-optimization/104156] [12 Regression] " pinskia at gcc dot gnu.org
2022-01-21  8:27 ` [Bug tree-optimization/104156] [12 Regression] -fcompare-debug failure with -O2 -funswitch-loops since r12-4526-gd8edfadfc7a9795b marxin at gcc dot gnu.org
2022-01-21  8:42 ` pinskia at gcc dot gnu.org
2022-01-21  9:00 ` rguenth at gcc dot gnu.org
2022-01-21 11:19 ` cvs-commit at gcc dot gnu.org
2022-01-21 11:22 ` rguenth at gcc dot gnu.org
2022-01-22  2:22 ` cnsun at uwaterloo dot ca
2022-01-22 20:15 ` pinskia at gcc dot gnu.org
2022-01-22 21:37 ` cnsun at uwaterloo dot ca
2022-01-24  7:57 ` rguenther at suse dot de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).