llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.6k stars 11.82k forks source link

segmentation fault while compiling template class with inner class and enum #12689

Closed llvmbot closed 12 years ago

llvmbot commented 12 years ago
Bugzilla Link 12317
Resolution FIXED
Resolved on Mar 21, 2012 22:37
Version trunk
OS Linux
Attachments source file, preprocessed source, run script
Reporter LLVM Bugzilla Contributor
CC @DougGregor,@efriedma-quic,@zygoloid

Extended Description

Hi clang developers,

while compiling the following code I get a segfault.

clang_crash.cpp:

template class Outer { public: class Inner { public: //Inner(); enum { VAL1 = 1 }; //static const int VAL1=1;

char b[100-VAL1];

};

Inner inner; };

Outer outer;

/usr> clang++ clang_crash.cpp clang: error: unable to execute command: Segmentation fault

Some observations:

Afterwards, clang still segfaults.

I have attached the source, preprocessed source and the run script.

clang version 3.1 (trunk 153100) Target: x86_64-unknown-linux-gnu Thread model: posix

Could you have a look please?

Best regards, Martin

ec04fc15-fa35-46f2-80e1-5d271f2ef708 commented 12 years ago

Fixed in r153236.