[LLVMbugs] [Bug 7013] New: Error-on-valid and assert on templated friend function

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun May 2 02:05:47 PDT 2010


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

           Summary: Error-on-valid and assert on templated friend function
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: chris at bubblescope.net
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Created an attachment (id=4795)
 --> (http://llvm.org/bugs/attachment.cgi?id=4795)
Code which causes error

I attach two closely related testcases, reduced from the same boost file. I
suspect they are both showing the same underlying error.

templates_with_int causes an error-on-valid. templates_without_int causes an
assert-on-valid.

The error produced by templates_with_int suggests to me that somehow the
template arguments are getting rearranged.

The backtrace produced by templates_without_int is:

clang: Type.cpp:611: bool clang::Type::isConstantSizeType() const: Assertion
`!isDependentType() && "This doesn't make sense for dependent types"' failed.
0  clang           0x000000000149a582
1  clang           0x000000000149a469
2  libpthread.so.0 0x00007f1d86df08f0
3  libc.so.6       0x00007f1d860e0a75 gsignal + 53
4  libc.so.6       0x00007f1d860e45c0 abort + 384
5  libc.so.6       0x00007f1d860d9941 __assert_fail + 241
6  clang           0x0000000000a29beb
7  clang           0x00000000005ba8ce
8  clang           0x00000000005b968b
9  clang           0x00000000005b9586
10 clang           0x0000000000642cb5
11 clang           0x00000000006412c6
12 clang           0x0000000000640e74
13 clang           0x00000000006414e6
14 clang           0x00000000006412a3
15 clang           0x0000000000640e74
16 clang           0x000000000066c99f
17 clang           0x000000000066d011
18 clang           0x000000000056e005
19 clang           0x000000000056bfa8
20 clang           0x000000000056b26c
21 clang           0x0000000000569884
22 clang           0x0000000000568601
23 clang           0x000000000041aad1
24 clang           0x000000000068ffbe
25 clang           0x0000000000437014
26 clang           0x0000000000436c7f
27 clang           0x00000000004212ff
28 clang           0x0000000000409172
29 clang           0x000000000040dce2 main + 259
30 libc.so.6       0x00007f1d860cbc4d __libc_start_main + 253
31 clang           0x0000000000407b49
Stack dump:
0.      Program arguments: /usr/local/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -S -disable-free -main-file-name t.cc
-mrelocation-model static -mdisable-fp-elim -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -resource-dir /usr/local/lib/clang/2.0
-ferror-limit 19 -ftemplate-backtrace-limit 10 -fmessage-length 140
-fexceptions -fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics -o
/tmp/cc-E5zX5R.s -x c++ t.cc 
1.      <eof> parser at end of file
2.      Per-file LLVM IR generation
3.      t.cc:16:72: Generating code for declaration 'boost::op'
4.      t.cc:19:3: LLVM IR generation of compound statement ('{}')
clang: error: compiler command failed due to signal 6 (use -v to see
invocation)

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