1 /* PR c/69405 - [6 Regression] ICE in c_tree_printer on an invalid
3 /* Test to verify that the diagnostic doesn't cause an ICE when any
4 of the arguments to __atomic_fetch_OP is undeclared. */
5 /* { dg-do compile } */
7 void test_add_undeclared_first_arg (void)
10 __atomic_fetch_add (&a
, &b
, 0); /* { dg-error ".b. undeclared" } */
13 void test_sub_undeclared_first_arg (void)
16 __atomic_fetch_sub (&a
, &b
, 0); /* { dg-error ".b. undeclared" } */
19 void test_or_undeclared_first_arg (void)
22 __atomic_fetch_or (&a
, &b
, 0); /* { dg-error ".b. undeclared" } */
25 void test_and_undeclared_first_arg (void)
28 __atomic_fetch_and (&a
, &b
, 0); /* { dg-error ".b. undeclared" } */
31 void test_xor_undeclared_first_arg (void)
34 __atomic_fetch_xor (&a
, &b
, 0); /* { dg-error ".b. undeclared" } */
37 void test_nand_undeclared_first_arg (void)
40 __atomic_fetch_nand (&a
, &b
, 0); /* { dg-error ".b. undeclared" } */
44 void test_add_undeclared_second_arg (void)
47 __atomic_fetch_add (&a
, &b
, 0); /* { dg-error ".a. undeclared" } */
50 void test_sub_undeclared_second_arg (void)
53 __atomic_fetch_sub (&a
, &b
, 0); /* { dg-error ".a. undeclared" } */
56 void test_or_undeclared_second_arg (void)
59 __atomic_fetch_or (&a
, &b
, 0); /* { dg-error ".a. undeclared" } */
62 void test_and_undeclared_second_arg (void)
65 __atomic_fetch_and (&a
, &b
, 0); /* { dg-error ".a. undeclared" } */
68 void test_xor_undeclared_second_arg (void)
71 __atomic_fetch_xor (&a
, &b
, 0); /* { dg-error ".a. undeclared" } */
74 void test_nand_undeclared_second_arg (void)
77 __atomic_fetch_nand (&a
, &b
, 0); /* { dg-error ".a. undeclared" } */
81 void test_add_undeclared_third_arg (void)
84 __atomic_fetch_add (&a
, &b
, m
); /* { dg-error ".m. undeclared" } */
87 void test_sub_undeclared_third_arg (void)
90 __atomic_fetch_sub (&a
, &b
, m
); /* { dg-error ".m. undeclared" } */
93 void test_or_undeclared_third_arg (void)
96 __atomic_fetch_or (&a
, &b
, m
); /* { dg-error ".m. undeclared" } */
99 void test_and_undeclared_third_arg (void)
102 __atomic_fetch_and (&a
, &b
, m
); /* { dg-error ".m. undeclared" } */
105 void test_xor_undeclared_third_arg (void)
108 __atomic_fetch_xor (&a
, &b
, m
); /* { dg-error ".m. undeclared" } */
111 void test_nand_undeclared_third_arg (void)
114 __atomic_fetch_nand (&a
, &b
, m
); /* { dg-error ".m. undeclared" } */