[LLVMbugs] [Bug 16630] New: clang crashes on using declaration with union member
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jul 15 07:30:12 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=16630
Bug ID: 16630
Summary: clang crashes on using declaration with union member
Product: clang
Version: 3.3
Hardware: PC
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: d.leinhaeuser at fishlabs.net
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 10882
--> http://llvm.org/bugs/attachment.cgi?id=10882&action=edit
Full output of the clang++ invocation.
using declarations that refer to union members seem to crash clang++.
Steps to reproduce:
Compile the following program (simply invoking 'clang++ [FILENAME]'):
struct A { union { int x; }; };
struct B : private A { using A::x; } b;
int main (int, char**) { b.x = 0; return 0; }
Actual result:
clang++ generates an the following (incorrect IMHO) error message and then
exits with a segmentation fault (full output is attached):
testUsing.cc:4:26: error: cannot cast 'struct B' to its private base class 'A'
int main (int, char**) { b.x = 0; return 0; }
^
testUsing.cc:2:12: note: declared private here
struct B : private A { using A::x; } b;
^~~~~~~~~
Expected result: clang++ generates a program that simply exits with code 0.
(Tested with "i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc.
build 5658) (LLVM build 2336.11.00)")
Version & Platform:
clang version 3.3 (tags/RELEASE_33/final) on Mac OS X 10.8.4
Additional Information:
Crash log section (as per bug writing guidlines):
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 clang 0x0000000100119f8c 0x100000000 + 1154956
1 clang 0x000000010081970e 0x100000000 + 8492814
2 clang 0x0000000100119772 0x100000000 + 1152882
3 clang 0x00000001001126b9 0x100000000 + 1124025
4 clang 0x00000001000c3382 0x100000000 + 799618
5 clang 0x00000001000c2202 0x100000000 + 795138
6 clang 0x00000001000be83d 0x100000000 + 780349
7 clang 0x00000001000c1e4a 0x100000000 + 794186
8 clang 0x00000001000be83d 0x100000000 + 780349
9 clang 0x00000001000c510e 0x100000000 + 807182
10 clang 0x000000010018349c 0x100000000 + 1586332
11 clang 0x0000000100109aeb 0x100000000 + 1088235
12 clang 0x0000000100108078 0x100000000 + 1081464
13 clang 0x00000001001075df 0x100000000 + 1078751
14 clang 0x0000000100104c9d 0x100000000 + 1068189
15 clang 0x0000000100090999 0x100000000 + 592281
16 clang 0x000000010007d01d 0x100000000 + 512029
17 clang 0x000000010007c99e 0x100000000 + 510366
18 clang 0x000000010007c261 0x100000000 + 508513
19 clang 0x000000010007a62e 0x100000000 + 501294
20 clang 0x000000010005a5b6 0x100000000 + 370102
21 clang 0x00000001000566c0 0x100000000 + 353984
22 clang 0x000000010005531c 0x100000000 + 348956
23 clang 0x000000010002608d 0x100000000 + 155789
24 clang 0x0000000100009aa5 0x100000000 + 39589
25 clang 0x0000000100002f8b main + 2411
26 clang 0x0000000100002524 0x100000000 + 9508
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130715/ea836554/attachment.html>
More information about the llvm-bugs
mailing list