27 lines · c
1// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 52// RUN: %clang_cc1 -triple x86_64-unknown-unknown -Wno-error=underlying-atomic-qualifier-ignored -std=c23 %s -emit-llvm -o - | FileCheck %s3 4// Ensure that an "atomic" underlying type has no actual atomic semantics5// because the qualifier is stripped.6 7enum E : _Atomic(int) {8 Foo9};10 11// CHECK-LABEL: define {{.*}} void @test(12// CHECK-SAME: i32 noundef [[E:%.*]]) #[[ATTR0:[0-9]+]] {13// CHECK-NEXT: [[ENTRY:.*:]]14// CHECK-NEXT: [[E_ADDR:%.*]] = alloca i3215// CHECK-NEXT: [[X:%.*]] = alloca i3216// CHECK-NEXT: store i32 [[E]], ptr [[E_ADDR]]17// CHECK-NEXT: [[TMP0:%.*]] = load i32, ptr [[E_ADDR]]18// CHECK-NEXT: store i32 [[TMP0]], ptr [[X]]19// CHECK-NEXT: store i32 0, ptr [[E_ADDR]]20// CHECK-NEXT: ret void21//22void test(enum E e) {23 int x = e;24 e = Foo;25}26 27