testsuite: Skip analyzer tests on AIX.
[official-gcc.git] / gcc / testsuite / c-c++-common / cold-1.c
blob3493623e1eba2facdc817c3c7e17270de8ae018f
1 /* PR ipa/93087 */
2 /* { dg-do compile { target nonpic } } */
3 /* { dg-options "-O1 -Wsuggest-attribute=cold" } */
5 extern void *getdata (void);
6 extern int set_error (char const *message) __attribute__((cold));
8 __attribute__((cold)) int
9 set_nomem (void) /* { dg-bogus "function might be candidate for attribute 'cold'" } */
11 return set_error ("Allocation failed");
14 void *
15 getdata_or_set_error (void)
17 void *result;
18 result = getdata ();
19 if (!result)
20 set_nomem ();
21 return result;