Question about [r185450 - More fixes for block mangling.]

Eli Friedman eli.friedman at gmail.com
Wed Jul 3 15:56:49 PDT 2013


What sort of thoughts were you looking for? :)  Yes, it's a bug; I'll take
a look.

-Eli

On Wed, Jul 3, 2013 at 3:37 PM, Faisal Vali <faisalv at gmail.com> wrote:

> Hi Eli,
>      Sometime around r185450
> [
> http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130701/083020.html
> ],
> the following fragment now causes an assertion violation - any thoughts?
>
> int test(double d) {
>   struct Local {
>     template<class T> T foo(T t) {
>       return t;
>     }
>   };
>   return Local{}.foo(d);
> }
>
> Here is the assertion violation:
>
> Assertion failed: !isLocalContainerContext(DC), file
> ..\..\..\..\..\llvm\tools\clang\lib\AST\ItaniumM
> angle.cpp, line 1474
> Stack dump:
> 0.      Program arguments: c:\clang-trunk\build\bin\Debug\clang.exe
> -cc1 -triple i686-pc-win32 -emit-
> llvm-bc -disable-free -main-file-name test.cpp -mrelocation-model
> static -mdisable-fp-elim -fmath-err
> no -masm-verbose -mconstructor-aliases -target-cpu pentium4
> -coverage-file test.cpp.bc -resource-dir
> c:\clang-trunk\build\bin\Debug\..\lib\clang\3.4 -internal-isystem
> c:\clang-trunk\build\bin\Debug\..\l
> ib\clang\3.4\include -internal-isystem C:\Program Files
> (x86)\Microsoft Visual Studio 10.0\VC\include
>  -internal-isystem C:\Program Files (x86)\Microsoft
> SDKs\Windows\v7.0A\\include -std=c++1y -fdeprecat
> ed-macro -ferror-limit 19 -fmessage-length 101 -mstackrealign
> -fms-extensions -fms-compatibility -fms
> c-version=1300 -fdelayed-template-parsing -fobjc-runtime=gcc
> -fobjc-default-synthesize-properties -fc
> xx-exceptions -fexceptions -fdiagnostics-show-option
> -fcolor-diagnostics -vectorize-loops -o test.cpp
> .bc -x c++ c:\clang-trunk\clang-trunk-fv\tests\test.cpp
> 1.      <eof> parser at end of file
> 2.      c:\clang-trunk\clang-trunk-fv\tests\test.cpp:10:5: LLVM IR
> generation of declaration 'test'
> 3.      c:\clang-trunk\clang-trunk-fv\tests\test.cpp:10:5: Generating
> code for declaration 'test'
> 4.      c:\clang-trunk\clang-trunk-fv\tests\test.cpp:12:25: Mangling
> declaration 'test(double)::Local
> ::foo'
> 0x52738A0B (0x0000000A 0x00000000 0x052BC728 0x52804BA6),
> _get_pgmptr() + 0x21B bytes(s)
> 0x5281433E (0x052BC820 0x052BC73C 0x02F8C08F 0xCCCCCCCC), abort() +
> 0x1E bytes(s)
> 0x52804BA6 (0x044BD69C 0x044BD6D8 0x000005C2 0x052BC930), _wassert() +
> 0xD6 bytes(s)
> 0x030E700E (0x055ECAD4 0x00000000 0x052BC930 0x00000000), `anonymous
> namespace'::CXXNameMangler::mang
> lePrefix() + 0x8E bytes(s),
> c:\clang-trunk\llvm\tools\clang\lib\ast\itaniummangle.cpp, line 1474 +
> 0x
> 2A byte(s)
> 0x030E7090 (0x055ECB50 0x00000000 0x00000000 0x052BC8D0), `anonymous
> namespace'::CXXNameMangler::mang
> lePrefix() + 0x110 bytes(s),
> c:\clang-trunk\llvm\tools\clang\lib\ast\itaniummangle.cpp, line 1487
> 0x030E726E (0x055ECDE0 0x00000000 0x055ECDE0 0xCCCCCCCC), `anonymous
> namespace'::CXXNameMangler::mang
> leTemplatePrefix() + 0x6E bytes(s),
> c:\clang-trunk\llvm\tools\clang\lib\ast\itaniummangle.cpp, line 1
> 534
> 0x030E66E2 (0x055ED210 0x055ECB50 0x00000001 0x052BC8A8), `anonymous
> namespace'::CXXNameMangler::mang
> leNestedName() + 0xA2 bytes(s),
> c:\clang-trunk\llvm\tools\clang\lib\ast\itaniummangle.cpp, line 1254
> 0x030E69E6 (0x055ED210 0xCCCCCCCC 0xCCCCCCCC 0xCCCCCCCC), `anonymous
> namespace'::CXXNameMangler::mang
> leLocalName() + 0x226 bytes(s),
> c:\clang-trunk\llvm\tools\clang\lib\ast\itaniummangle.cpp, line 1331
> 0x030E4C71 (0x055ED210 0x052BC930 0xCCCCCCCC 0xCCCCCCCC), `anonymous
> namespace'::CXXNameMangler::mang
> leName() + 0xB1 bytes(s),
> c:\clang-trunk\llvm\tools\clang\lib\ast\itaniummangle.cpp, line 569
> 0x030E4AF7 (0x055ED210 0x052BC920 0xCCCCCCCC 0xCCCCCCCC), `anonymous
> namespace'::CXXNameMangler::mang
> leFunctionEncoding() + 0x27 bytes(s),
> c:\clang-trunk\llvm\tools\clang\lib\ast\itaniummangle.cpp, line
>  464
> 0x030E4A48 (0x055ED210 0x044BECCC 0x00000002 0x052BCABC), `anonymous
> namespace'::CXXNameMangler::mang
> le() + 0xE8 bytes(s),
> c:\clang-trunk\llvm\tools\clang\lib\ast\itaniummangle.cpp, line 452 +
> 0xC byte(
> s)
> 0x030ECB27 (0x055ED210 0x052BC974 0x052BCCE8 0x052BD2A0), `anonymous
> namespace'::ItaniumMangleContext
> ::mangleName() + 0x117 bytes(s),
> c:\clang-trunk\llvm\tools\clang\lib\ast\itaniummangle.cpp, line 3529
>  + 0x1B byte(s)
> 0x01D3F4DE (0x052BCAD8 0x055ED210 0xCCCCCCCC 0xCCCCCCCC),
> clang::CodeGen::CodeGenModule::getMangledNa
> me() + 0x2AE bytes(s),
> c:\clang-trunk\llvm\tools\clang\lib\codegen\codegenmodule.cpp, line
> 441 + 0x35
>  byte(s)
> 0x01D42ACA (0x055ED210 0x0044EC8C 0x00000000 0x052BCDF4),
> clang::CodeGen::CodeGenModule::GetAddrOfFun
> ction() + 0x6A bytes(s),
> c:\clang-trunk\llvm\tools\clang\lib\codegen\codegenmodule.cpp, line
> 1434
> 0x01ECD5EC (0x052BCE08 0x055ED2E8 0x00000000 0x052BD0CC),
> clang::CodeGen::CodeGenFunction::EmitCXXMem
> berCallExpr() + 0x94C bytes(s),
> c:\clang-trunk\llvm\tools\clang\lib\codegen\cgexprcxx.cpp, line 320 +
>  0x1D byte(s)
> 0x01EB9375 (0x052BCE08 0x055ED2E8 0x00000000 0xCCCCCCCC),
> clang::CodeGen::CodeGenFunction::EmitCallEx
> pr() + 0x105 bytes(s),
> c:\clang-trunk\llvm\tools\clang\lib\codegen\cgexpr.cpp, line 2845 +
> 0x14 byte(
> s)
> 0x01F03A19 (0x055ED2E8 0x052BD124 0x052BCE54 0x01F0249D), `anonymous
> namespace'::ScalarExprEmitter::V
> isitCallExpr() + 0x69 bytes(s),
> c:\clang-trunk\llvm\tools\clang\lib\codegen\cgexprscalar.cpp, line 28
> 2 + 0x1D byte(s)
>
> [More...]
>
> Thanks!
>
> Faisal Vali
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130703/089ab4c3/attachment.html>


More information about the cfe-commits mailing list