This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/25182] New: internal compiler error triggered by overflow in constant expression


/* bug.i */
# 1 "bug.c"
# 0 "<built-in>"
# 1 "<command line>"
# 1 "bug.c"




# 1 "error.h" 1





enum err {
  err_none,
  err_IO = 0x8a450000,
  err_NM,
  err_EOF,
  err_SE,
  err_PT,
  err_PS,
  err_SI,
  err_UH,
  err_CF,
  err_CT,
  err_LT,
  err_UT,
  err_CS,
  err_MS,
  err_SM
};





void seterror(enum err);
int error(void);
# 6 "bug.c" 2



static enum err E_;



void seterror(enum err e) { E_ = e; }

int error()
{
  switch (E_) {
    case err_IO : break;
    case err_NM : break;
    case err_EOF : break;
    case err_SE : break;
    case err_PT : break;
    case err_PS : break;
    case err_SI : break;
    case err_UH : break;
    case err_CF : break;
    case err_CT : break;
    case err_LT : break;
    case err_UT : break;
    case err_CS : break;
    case err_MS : break;
    case err_SM : break;
    case err_none:
    default : return 0;
  }
  E_ = err_none;
  return 1;
}


/* gcc version */

Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.1-20050508/configure --prefix=/home/jklaue/local
Thread model: posix
gcc version 4.1.0 20050508 (experimental)


/* command line and errors */

gcc -pedantic -save-temps -c bug.c
In file included from bug.c:6:
error.h:8: warning: ISO C restricts enumerator values to range of 'int'
bug.c: In function 'error':
bug.c:18: warning: overflow in constant expression
bug.c:18: warning: overflow in implicit constant conversion
bug.c:19: warning: overflow in constant expression
bug.c:19: warning: overflow in implicit constant conversion
bug.c:20: warning: overflow in constant expression
bug.c:20: warning: overflow in implicit constant conversion
bug.c:21: warning: overflow in constant expression
bug.c:21: warning: overflow in implicit constant conversion
bug.c:22: warning: overflow in constant expression
bug.c:22: warning: overflow in implicit constant conversion
bug.c:23: warning: overflow in constant expression
bug.c:23: warning: overflow in implicit constant conversion
bug.c:24: warning: overflow in constant expression
bug.c:24: warning: overflow in implicit constant conversion
bug.c:25: warning: overflow in constant expression
bug.c:25: warning: overflow in implicit constant conversion
bug.c:26: warning: overflow in constant expression
bug.c:26: warning: overflow in implicit constant conversion
bug.c:27: warning: overflow in constant expression
bug.c:27: warning: overflow in implicit constant conversion
bug.c:28: warning: overflow in constant expression
bug.c:28: warning: overflow in implicit constant conversion
bug.c:29: warning: overflow in constant expression
bug.c:29: warning: overflow in implicit constant conversion
bug.c:30: warning: overflow in constant expression
bug.c:30: warning: overflow in implicit constant conversion
bug.c:31: warning: overflow in constant expression
bug.c:31: warning: overflow in implicit constant conversion
bug.c:32: warning: overflow in constant expression
bug.c:32: warning: overflow in implicit constant conversion
bug.c:17: internal compiler error: in tree_low_cst, at tree.c:3864


-- 
           Summary: internal compiler error triggered by overflow in
                    constant expression
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: klaue at dresearch dot de


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]