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

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Sep 28 01:25:27 PDT 2012


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

             Bug #: 13968
           Summary: GlobalOpt::ProcessGlobal Assertion
                    `(isa<PHINode>(GlobalUser) ||
                    isa<SelectInst>(GlobalUser) ||
                    isa<ConstantExpr>(GlobalUser) ||
                    isa<CmpInst>(GlobalUser)) && "Only expect load and
                    stores!"' failed
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: kcc at google.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


clang r164813, 64-bit linux; test case by csmith+creduce

clang -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free 
-target-cpu x86-64  -O3 -w  -o 375209910.o -x cpp-output 375209910.i

clang: /home/kcc/llvm/lib/Transforms/IPO/GlobalOpt.cpp:966: bool
OptimizeAwayTrappingUsesOfLoads(llvm::GlobalVariable*, llvm::Constant*,
llvm::TargetData*, llvm::TargetLibraryInfo*): Assertion
`(isa<PHINode>(GlobalUser) || isa<SelectInst>(GlobalUser) ||
isa<ConstantExpr>(GlobalUser) || isa<CmpInst>(GlobalUser)) && "Only expect load
and stores!"' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff6ebea75 in *__GI_raise (sig=<optimized out>) at
../nptl/sysdeps/unix/sysv/linux/raise.c:64
64      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff6ebea75 in *__GI_raise (sig=<optimized out>) at
../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007ffff6ec25c0 in *__GI_abort () at abort.c:92
#2  0x00007ffff6eb7941 in *__GI___assert_fail (
    assertion=0x22653a8 "(isa<PHINode>(GlobalUser) ||
isa<SelectInst>(GlobalUser) || isa<ConstantExpr>(GlobalUser) ||
isa<CmpInst>(GlobalUser)) && \"Only expect load and stores!\"", 
    file=<optimized out>, line=966, 
    function=0x226b480 <OptimizeAwayTrappingUsesOfLoads(llvm::GlobalVariable*,
llvm::Constant*, llvm::TargetData*,
llvm::TargetLibraryInfo*)::__PRETTY_FUNCTION__> "bool
OptimizeAwayTrappingUsesOfLoads(llvm::GlobalVariable*, llvm::Constant*,
llvm::TargetData*, llvm::TargetLibraryInfo*)") at assert.c:81
#3  0x0000000000a43153 in (anonymous
namespace)::GlobalOpt::ProcessGlobal(llvm::GlobalVariable*,
llvm::ilist_iterator<llvm::GlobalVariable>&) ()
#4  0x0000000000a4368e in (anonymous
namespace)::GlobalOpt::runOnModule(llvm::Module&) ()
#5  0x00000000011b00c1 in llvm::MPPassManager::runOnModule(llvm::Module&) ()
#6  0x00000000011b023b in llvm::PassManagerImpl::run(llvm::Module&) ()



static long *a;
static long **b = &a;
fn1 () {
  (0, (void *) 0) != b;
  *b = 1;
  **b;
}

-- 
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