diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-05-13 04:12:56 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-05-13 04:12:56 +0000 |
| commit | e2df3f9fe5978dd0025247cf20ee4a20bb29fe75 (patch) | |
| tree | fe3b19d617d1a2e3c23ca1e4346d23cd84254c44 /clang/test | |
| parent | 851eb927d7e44b4f75d1f13a065ced7c19604ed3 (diff) | |
| download | bcm5719-llvm-e2df3f9fe5978dd0025247cf20ee4a20bb29fe75.tar.gz bcm5719-llvm-e2df3f9fe5978dd0025247cf20ee4a20bb29fe75.zip | |
Fix rdar://6880874 - [sema] crash on array types with different index sizes
llvm-svn: 71634
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Sema/types.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/Sema/types.c b/clang/test/Sema/types.c index 3ee76756eeb..7ab4e0672ce 100644 --- a/clang/test/Sema/types.c +++ b/clang/test/Sema/types.c @@ -19,3 +19,14 @@ int b() { int __int128_t; int __uint128_t; } + + +// Array type merging should convert array size to whatever matches the target +// pointer size. +// rdar://6880874 +extern int i[1LL]; +int i[(short)1]; + +enum e { e_1 }; +extern int j[sizeof(enum e)]; // expected-note {{previous definition}} +int j[42]; // expected-error {{redefinition of 'j' with a different type}} |

