diff options
Diffstat (limited to 'test/SemaTemplate/attributes.cpp')
-rw-r--r-- | test/SemaTemplate/attributes.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/SemaTemplate/attributes.cpp b/test/SemaTemplate/attributes.cpp index b696c5cd98..c578faba31 100644 --- a/test/SemaTemplate/attributes.cpp +++ b/test/SemaTemplate/attributes.cpp @@ -6,3 +6,24 @@ struct X { int __attribute__((__address_space__(N))) *ptr; // expected-error{{attribute requires 1 argument(s)}} }; + +namespace PR7102 { + + class NotTpl { + public: + union { + char space[11]; + void* ptr; + } __attribute__((packed)); + }; + template<unsigned N> + class Tpl { + public: + union { + char space[N]; + void* ptr; + } __attribute__((packed)); + }; + + int array[sizeof(NotTpl) == sizeof(Tpl<11>)? 1 : -1]; +} |