public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/19937] New: [4.0 regression] Wrong loop exit
@ 2005-02-13 22:20 schwab at suse dot de
  2005-02-13 22:55 ` [Bug c/19937] " pinskia at gcc dot gnu dot org
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: schwab at suse dot de @ 2005-02-13 22:20 UTC (permalink / raw)
  To: gcc-bugs

$ cat loop.c   
typedef __SIZE_TYPE__ size_t;   
extern void abort (void);   
extern size_t strlen (const char *);   
extern int strncmp (const char *, const char *, size_t);   
int foo (const char *name)   
{   
  static const char *debug_sec_names [] =   
    {   
      ".debug",   
      ".gnu.linkonce.wi.",   
      ".line",   
      ".stab"   
    };   
  int i;   
  int flags = 0;   
   
  for (i = sizeof (debug_sec_names) / sizeof (debug_sec_names[0]); i--;)   
    if (strncmp (name, debug_sec_names[i], strlen (debug_sec_names[i])) == 0)   
      break;   
   
  if (i >= 0)   
    flags |= 0x10000;   
  return flags;   
}   
   
int main (void)   
{   
  if (foo (".interp") == 0x10000)   
    abort ();   
  return 0;   
}   
$ gcc -O2 loop.c   
$ ./a.out   
Aborted

-- 
           Summary: [4.0 regression] Wrong loop exit
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: critical
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: schwab at suse dot de
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: ia64-suse-linux


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


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

end of thread, other threads:[~2005-02-25 17:04 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-13 22:20 [Bug c/19937] New: [4.0 regression] Wrong loop exit schwab at suse dot de
2005-02-13 22:55 ` [Bug c/19937] " pinskia at gcc dot gnu dot org
2005-02-13 23:03 ` [Bug tree-optimization/19937] " pinskia at gcc dot gnu dot org
2005-02-13 23:44 ` pinskia at gcc dot gnu dot org
2005-02-14  2:42 ` schwab at suse dot de
2005-02-14  5:16 ` rakdver at gcc dot gnu dot org
2005-02-14 10:22 ` rakdver at gcc dot gnu dot org
2005-02-14 15:03 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2005-02-14 15:03 ` schlie at comcast dot net
2005-02-18 14:53 ` pinskia at gcc dot gnu dot org
2005-02-18 15:55 ` [Bug tree-optimization/19937] [4.0 regression] Wrong loop exit (causes binutils to fail) schlie at comcast dot net
2005-02-20 22:24 ` pinskia at gcc dot gnu dot org
2005-02-23 16:19 ` jakub at gcc dot gnu dot org
2005-02-25 16:55 ` cvs-commit at gcc dot gnu dot org
2005-02-25 16:56 ` rakdver at gcc dot gnu dot org
2005-02-25 17:04 ` pinskia at gcc dot gnu dot org
2005-02-25 18:14 ` pinskia at gcc dot gnu dot org
2005-02-26  0:02 ` cvs-commit at gcc dot gnu dot org
2005-02-26  0:16 ` rakdver 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).