public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/16372] New: Wrong code for enums
@ 2004-07-05 18:56 schuele at informatik dot uni-kl dot de
  2004-07-05 19:03 ` [Bug c++/16372] " schuele at informatik dot uni-kl dot de
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: schuele at informatik dot uni-kl dot de @ 2004-07-05 18:56 UTC (permalink / raw)
  To: gcc-bugs

Hi, 
 
there still seems to be a problem with enums in GCC 3.4.1 (see bug #15069). 
When you compile the follwing snippet with -O0, everthing works well. However, 
with -O1, the output is "234" which is wrong. Sorry, if this is a duplicate 
bug report, but I assumed it would be fixed in GCC 3.4.1. Thanks for your 
help. 
 
Regards, 
Tobias 
 
 
#include <iostream> 
 
enum number {ZERO, ONE, TWO, THREE, FOUR, FIVE}; 
 
int main() { 
  number n = FIVE; 
 
  if((n == ONE) || (n == TWO) || (n == THREE)) { 
    std::cout << "234" << std::endl; 
  } 
}

-- 
           Summary: Wrong code for enums
           Product: gcc
           Version: 3.4.1
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: schuele at informatik dot uni-kl dot de
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu


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


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

end of thread, other threads:[~2004-08-25 20:58 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-05 18:56 [Bug c++/16372] New: Wrong code for enums schuele at informatik dot uni-kl dot de
2004-07-05 19:03 ` [Bug c++/16372] " schuele at informatik dot uni-kl dot de
2004-07-05 21:16 ` pinskia at gcc dot gnu dot org
2004-07-10 18:24 ` [Bug tree-optimization/16372] [3.4/3.5 Regression] " cvs-commit at gcc dot gnu dot org
2004-07-12  5:41 ` [Bug tree-optimization/16372] [3.5 " pinskia at gcc dot gnu dot org
2004-07-27 23:32 ` pinskia at gcc dot gnu dot org
2004-07-27 23:33 ` pinskia at gcc dot gnu dot org
2004-07-27 23:33 ` pinskia at gcc dot gnu dot org
2004-07-28  1:39 ` bangerth at dealii dot org
2004-07-29 18:40 ` jakub at gcc dot gnu dot org
2004-08-25 17:22 ` cvs-commit at gcc dot gnu dot org
2004-08-25 20:51 ` cvs-commit at gcc dot gnu dot org
2004-08-25 20:58 ` pinskia 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).