libstdc++: Fix find_last_set(simd_mask) to ignore padding bits
[official-gcc.git] / gcc / testsuite / objc.dg / super-dealloc-2.m
blob5d588c50fa96c7cb6270bf70918fff42e9214908
1 /* Check for warnings about missing [super dealloc] calls.  */
2 /* Author: Ziemowit Laski <zlaski@apple.com>  */
4 /* { dg-do compile } */
5 /* { dg-additional-options "-Wno-objc-root-class" } */
7 @interface Foo {
8   void *isa;
10 - (void) dealloc;
11 - (void) some_other;
12 @end
14 @interface Bar: Foo {
15   void *casa;
17 - (void) dealloc0;
18 @end
20 @interface Baz: Bar {
21   void *usa;
23 - (void) dealloc;
24 @end
26 @implementation Foo
27 - (void) dealloc {
28   isa = 0;   /* Should not warn here.  */
30 - (void) some_other {
31   isa = (void *)-1;
33 @end
35 @implementation Bar
36 - (void) dealloc0 {
37   casa = 0;
38   [super some_other];  /* Should not warn here.  */
39
40 @end
42 @implementation Baz
43 - (void) dealloc {
44   usa = 0;
45   [super dealloc0]; 
46 } /* { dg-warning "method possibly missing a .super dealloc. call" } */
47 @end