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 middle-end/26300] New: [4.1 Regression] ICE in trunc_int_for_mode


extern void fn1 (long int) __attribute__ ((noreturn));
void fn2 (long int);
extern long int u, v;
struct S
{
  char c;
  long int d;
  long int e;
};

static inline struct S *
fn3 (long int x)
{
  if (*(char *) x != 6)
    fn1 (0);
  return (struct S *) x;
}

static inline int
fn4 (long int x)
{
  if (x == u)
    return 3;
  fn2 (x);
  return 0;
}

int
test (long int x)
{
  long int r;
  int m = 0;

  for (r = x; r != v; r = (fn3 (r)->d))
    if (*(char *) r != 6)
      fn1 (x);
    else
      m |= 1 << (fn4 (fn3 (r)->e) - 1);
  return m;
}

ICEs at -O and above on x86_64.


-- 
           Summary: [4.1 Regression] ICE in trunc_int_for_mode
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jakub at gcc dot gnu dot org
GCC target triplet: x86_64-linux


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


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