RISC-V: Correct mode_idx attribute for viwalu wx variants [PR116149].
[official-gcc.git] / gcc / testsuite / objc.dg / super-dealloc-1.m
blob035de055b25f3ab35368960768225260da448153
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) dealloc;
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) dealloc {
37   casa = 0;
38   [super some_other];
39 }  /* { dg-warning "method possibly missing a .super dealloc. call" } */
40 @end
42 @implementation Baz
43 - (void) dealloc {
44   usa = 0;
45   [super dealloc];  /* Should not warn here.  */
47 @end