Skip several analyzer socket tests on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / c-c++-common / analyzer / invalid-shift-1.c
blob08e52728748babb0a360ae181832b376de7c77f9
1 /* PR tree-optimization/97424. */
3 #include <stdint.h>
5 static inline uint32_t
6 _dl_hwcaps_subdirs_build_bitmask (int subdirs, int active)
8 /* Leading subdirectories that are not active. */
9 int inactive = subdirs - active;
10 if (inactive == 32)
11 return 0;
13 uint32_t mask;
14 if (subdirs != 32)
15 mask = (1 << subdirs) - 1; /* { dg-message "shift by count \\('33'\\) >= precision of type \\('\[0-9\]+'\\)" } */
16 else
17 mask = -1;
18 return mask ^ ((1U << inactive) - 1); /* { dg-message "shift by negative count \\('-1'\\)" } */
21 void f1 (int);
23 void
24 f2 (void)
26 f1 (_dl_hwcaps_subdirs_build_bitmask (1, 2));
27 f1 (_dl_hwcaps_subdirs_build_bitmask (33, 31));
30 static int __attribute__((noinline)) op3 (int op, int c) { return op << c; } /* { dg-message "shift by negative count \\('-1'\\)" } */
31 int test_3 (void) { return op3 (1, -1); }
33 static int __attribute__((noinline)) op4 (int op, int c) { return op << c; }
34 int test_4 (void) { return op4 (1, 0); }