[LLVMbugs] [Bug 9856] New: Assertion `(isa<PHINode>(GlobalUser) || isa<SelectInst>(GlobalUser) || isa<ConstantExpr>(GlobalUser)) && "Only expect load and stores!"' failed.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri May 6 07:16:00 PDT 2011


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

           Summary: Assertion `(isa<PHINode>(GlobalUser) ||
                    isa<SelectInst>(GlobalUser) ||
                    isa<ConstantExpr>(GlobalUser)) && "Only expect load
                    and stores!"' 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 gamow tmp021]$ clang -O small.c -c -w
clang: GlobalOpt.cpp:802: bool
OptimizeAwayTrappingUsesOfLoads(llvm::GlobalVariable*, llvm::Constant*):
Assertion `(isa<PHINode>(GlobalUser) || isa<SelectInst>(GlobalUser) ||
isa<ConstantExpr>(GlobalUser)) && "Only expect load and stores!"' failed.
0  clang           0x00000000018e308f
1  clang           0x00000000018e5302
2  libpthread.so.0 0x00007ffff7bcf8f0
3  libc.so.6       0x00007ffff6ebea75 gsignal + 53
4  libc.so.6       0x00007ffff6ec25c0 abort + 384
5  libc.so.6       0x00007ffff6eb7941 __assert_fail + 241
6  clang           0x0000000000ebb68d
7  clang           0x0000000000ebe3a0
8  clang           0x0000000000ebf0fb
9  clang           0x0000000000ebf5ad
10 clang           0x000000000182f377
llvm::MPPassManager::runOnModule(llvm::Module&) + 503
11 clang           0x000000000182f50b llvm::PassManagerImpl::run(llvm::Module&)
+ 187
12 clang           0x00000000007c8a08
13 clang           0x00000000007c968d
clang::EmitBackendOutput(clang::Diagnostic&, clang::CodeGenOptions const&,
clang::TargetOptions const&, llvm::Module*, clang::BackendAction,
llvm::raw_ostream*) + 189
14 clang           0x00000000007c607b
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 251
15 clang           0x00000000008f5efd clang::ParseAST(clang::Sema&, bool) + 413
16 clang           0x00000000007c53c4 clang::CodeGenAction::ExecuteAction() +
68
17 clang           0x00000000006b1583
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 371
18 clang           0x0000000000688b84
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1268
19 clang           0x000000000067fa3b cc1_main(char const**, char const**, char
const*, void*) + 683
20 clang           0x00000000006879d7 main + 6295
21 libc.so.6       0x00007ffff6ea9c4d __libc_start_main + 253
22 clang           0x000000000067df09
Stack dump:
0.    Program arguments:
/uusoc/exports/scratch/regehr/z/compiler-install/llvm-gcc-r130980-install/bin/clang
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
small.c -mrelocation-model static -mdisable-fp-elim -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version
2.20.1 -momit-leaf-frame-pointer -coverage-file small.o -resource-dir
/uusoc/exports/scratch/regehr/z/compiler-install/llvm-gcc-r130980-install/bin/../lib/clang/3.0
-O2 -w -ferror-limit 19 -fmessage-length 80 -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 'Global Variable Optimizer' on module 'small.c'.
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal 1 (use -v to see
invocation)
[regehr at gamow tmp021]$ clang -v
clang version 3.0 (trunk 130980)
Target: x86_64-unknown-linux-gnu
Thread model: posix
[regehr at gamow tmp021]$ cat small.c
struct S0 {
  int f3;
  int f6;
  int f8;
};

static int **g_52;

int *g_90;

struct S0 g_175[0] = {
};

int func_47 (int, int, int **p_50, int);

unsigned long long func_9 (unsigned short p_10) {
  int l_18[2] = { 0, 0 };
  if (l_18[1], l_18[1], func_47 (0, 0, g_52, 1), g_175[0].f8, g_175[0].f3)
    ;
  int **l_203[0];
  int ***l_208 = &l_203[0];
  int **l_117 = &g_90;
  int ***l_118 = &g_52;
  *l_118 = l_117;
  g_175[0].f6 <= g_175[0].f8 || l_208 != &g_52;
  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