[LLVMbugs] [Bug 10189] New: Assertion `!Duplicates.count(Factor) && "Shouldn't have two constant factors, missed a canonicalize"' failed.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jun 24 22:21:33 PDT 2011


http://llvm.org/bugs/show_bug.cgi?id=10189

           Summary: Assertion `!Duplicates.count(Factor) && "Shouldn't
                    have two constant factors, missed a canonicalize"'
                    failed.
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: regehr at cs.utah.edu
                CC: llvmbugs at cs.uiuc.edu, chenyang at cs.utah.edu


regehr at home:~/volatile/bugs/tmp038$ clang -v
clang version 3.0 (trunk 133864)
Target: i386-pc-linux-gnu
Thread model: posix
regehr at home:~/volatile/bugs/tmp038$ clang -c -w -O2 small.c
clang: Reassociate.cpp:818:
llvm::Value*<unnamed>::Reassociate::OptimizeAdd(llvm::Instruction*,
llvm::SmallVectorImpl<<unnamed>::ValueEntry>&): Assertion
`!Duplicates.count(Factor) && "Shouldn't have two constant factors, missed a
canonicalize"' failed.
0  clang 0x0980aa58
Stack dump:
0.    Program arguments:
/mnt/z/z/compiler-install/llvm-gcc-r133864-install/bin/clang -cc1 -triple
i386-pc-linux-gnu -emit-obj -disable-free -main-file-name small.c
-mrelocation-model static -mdisable-fp-elim -masm-verbose -mconstructor-aliases
-target-cpu pentium4 -target-linker-version 2.20.51 -momit-leaf-frame-pointer
-coverage-file small.o -resource-dir
/mnt/z/z/compiler-install/llvm-gcc-r133864-install/bin/../lib/clang/3.0 -O2 -w
-ferror-limit 19 -fmessage-length 78 -fgnu-runtime -fdiagnostics-show-option
-fcolor-diagnostics -o small.o -x c small.c 
1.    <eof> parser at end of file
2.    Per-module optimization passes
3.    Running pass 'CallGraph Pass Manager' on module 'small.c'.
4.    Running pass 'Reassociate expressions' on function '@mn'
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal 2 (use -v to see
invocation)
regehr at home:~/volatile/bugs/tmp038$ cat small.c
unsigned short
safe_53 (int short ui1, int short ui2)
{
  return ui1 - ui2;
}

int short
safe_60 (int short left, int right)
{
  return right ? 0 : left >> right;
}

struct S0
{
  int f;
};

struct S1
{
  int f3;
};

struct S2
{
  volatile struct S0 f2;
};

struct S3
{
  int f;
};

int short g_8;
int g_20[][1][0];
int g_37;

struct S2 g_6;

struct S3 g_169;

struct S1 g_177;
struct S2 g_1639[];

char func_13 (unsigned, unsigned short, short);

char func_21 (unsigned char, unsigned, int *);

struct S2 func_1 (vo)
{
  int l_2 = 1;
  l_2 && func_13 (0, 0, 0), 0;
  return g_1639[0];
}

char func_13 (unsigned p_, unsigned short p_15, short p_1)
{
  int l_346;
  int *l_701 = &g_37;
  for (l_346 = 2; l_346 >= 0; l_346 -= 1)
    {
      for (; g_177.f3; g_177.f3 += 1);
      for (p_15 = 0; p_15 <= 2; p_15 += 1)
    *l_701 = safe_60 (g_6.f2.f, func_21 (g_169.f, 0, 0)) > 0;
    }
  return 0;
}

char
func_21 (unsigned char p_, unsigned p_2, int *p_24)
{
  int *l_30 = &g_20[0][0][1];
  int **l_29 = &l_30;
  **l_29 = safe_53 (*l_30, g_8);
  return **l_29;
}

int mn (void)
{
  func_1 ();
  return 0;
}

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list