aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr96307.c
blob: 89002b85c8ea6829e6b78679eedde653bb16753e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* PR target/96307 */
/* { dg-do compile } */
/* { dg-additional-options "-fsanitize=kernel-address --param=asan-instrumentation-with-call-threshold=8" } */
/* { dg-skip-if "no address sanitizer" { no_fsanitize_address } } */

#include <limits.h>
enum a {test1, test2, test3=INT_MAX};
enum a a;
enum a *b;

void reset (void);

void
t()
{
  if (a != test2)
    __builtin_abort ();
  if (*b != test2)
    __builtin_abort ();
  reset ();
  if (a != test1)
    __builtin_abort ();
  if (*b != test1)
    __builtin_abort ();
}