Skip to content

Assertion `I != r2iMap_.end() && "Interval does not exist for register"' failed when -fcatch-undefined-behavior is used #9361

@regehr

Description

@regehr
Bugzilla Link 8989
Resolution FIXED
Resolved on Jan 20, 2011 00:20
Version trunk
OS Linux
CC @stoklund

Extended Description

regehr@home:~/volatile/bugs/tmp345$ clang -c -O1 -fcatch-undefined-behavior small.c -w
clang: /mnt/z/z/compiler-build/llvm-r123579/include/llvm/CodeGen/LiveIntervalAnalysis.h:96: llvm::LiveInterval& llvm::LiveIntervals::getInterval(unsigned int): Assertion `I != r2iMap_.end() && "Interval does not exist for register"' failed.
0 clang 0x09492668
Stack dump:
0. Program arguments: /mnt/z/z/compiler-install/llvm-gcc-r123579-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 -resource-dir /mnt/z/z/compiler-install/llvm-gcc-r123579-install/bin/../lib/clang/2.9 -O1 -w -ferror-limit 19 -fmessage-length 80 -fcatch-undefined-behavior -fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics -o small.o -x c small.c

  1. parser at end of file
  2. Code generation
  3. Running pass 'Function Pass Manager' on module 'small.c'.
  4. Running pass 'Simple Register Coalescing' on function '@func_39'
    clang: error: unable to execute command: Aborted
    clang: error: clang frontend command failed due to signal 1 (use -v to see invocation)

regehr@home:~/volatile/bugs/tmp345$ clang -v

clang version 2.9 (trunk 123579)
Target: i386-pc-linux-gnu
Thread model: posix

regehr@home:~/volatile/bugs/tmp345$ cat small.c

struct S0
{
int f1;
int f3;
unsigned char f5;
};

int safe (int);

struct S0 func_39 (const int * p_40, int * p_41,
int * const const uint32p_43)
{
unsigned char l_46[1][10];
if (safe (0))
{
}
else
{
struct S0 l_60 = {
1L, 8L
};
if (*p_40)
return l_60;
else
for (l_60.f5 = 0; l_60.f5 < 1; l_60.f5 += 1)
for (l_60.f1 = 0; l_60.f1 < 1; l_60.f1 += 1)
l_46[l_60.f5][l_60.f1];
}
struct S0 l_60 = {
1L, 8L
};
return l_60;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzilla

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions