public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/34088]  New: [4.3 regression] ICE with uninitialized variable and -Werror
@ 2007-11-13 22:35 reichelt at gcc dot gnu dot org
  2007-11-13 22:35 ` [Bug middle-end/34088] " reichelt at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-11-13 22:35 UTC (permalink / raw)
  To: gcc-bugs

The following valid code snippet triggers an ICE on mainline
when compiled with "gcc -O -Wall -Werror" on i686-pc-linux-gnu.

=====================================================
int F0 (int);
int F1 (int t) { return F0(t); }
int F2 (int t) { return F0(t); }

extern int X[];
static inline int foo(int i)
{
  return X[i];
}

int bar(int* p)
{
  int i;

  while ( ({ if (foo(*p) && foo(*p)); p; }) );

  return i;
}
=====================================================

cc1: warnings being treated as errors
bug.c: In function 'bar':
bug.c:17: error: 'i' is used uninitialized in this function
bug.c:12: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]

Although the first functions aren't used in bar where the ICE happens,
they're needed to reproduce the ICE.

I can trace the bug back to at least 2007-05-13.

Janis, a regression hunt might be useful here.
Would you mind running one?


-- 
           Summary: [4.3 regression] ICE with uninitialized variable and -
                    Werror
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, monitored
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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


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

end of thread, other threads:[~2007-11-14 19:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-13 22:35 [Bug middle-end/34088] New: [4.3 regression] ICE with uninitialized variable and -Werror reichelt at gcc dot gnu dot org
2007-11-13 22:35 ` [Bug middle-end/34088] " reichelt at gcc dot gnu dot org
2007-11-13 22:41 ` pinskia at gcc dot gnu dot org
2007-11-14  1:03 ` janis at gcc dot gnu dot org
2007-11-14  9:56 ` jakub at gcc dot gnu dot org
2007-11-14 19:33 ` jakub at gcc dot gnu dot org
2007-11-14 19:34 ` jakub at gcc dot gnu dot org

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).