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 | 38aeec7299c48cb79523f7f89776fb258c84aeea (patch) | |
tree | 38de365672fd24fead7824d0dd2d6d75db50d5a2 /test/Sema/types.c | |
parent | 2db15bdd945163eacfa4623fd2e32a536ed2dd3b (diff) |
Fix rdar://6880874 - [sema] crash on array types with different index sizes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71634 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/types.c')
-rw-r--r-- | test/Sema/types.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Sema/types.c b/test/Sema/types.c index 3ee76756ee..7ab4e0672c 100644 --- a/test/Sema/types.c +++ b/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}} |