Skip to content

Commit c976802

Browse files
SC llvm teamSC llvm team
authored andcommitted
Merged main:cc7b24a4d125e9a81480aaaa961a2b963bbb2ea2 into amd-gfx:d95b5e7b86c6
Local branch amd-gfx d95b5e7 Merged main:63b2595846b86b4e4eb9afba5e97dd64e8135c10 into amd-gfx:c176ed1b3b93 Remote branch main cc7b24a [NFC] Fix typos in comments (llvm#109765)
2 parents d95b5e7 + cc7b24a commit c976802

File tree

113 files changed

+2745
-1220
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+2745
-1220
lines changed

clang/lib/AST/ByteCode/Compiler.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,7 @@ bool Compiler<Emitter>::VisitCastExpr(const CastExpr *CE) {
431431
case CK_NoOp:
432432
case CK_UserDefinedConversion:
433433
case CK_AddressSpaceConversion:
434+
case CK_CPointerToObjCPointerCast:
434435
return this->delegate(SubExpr);
435436

436437
case CK_BitCast: {
@@ -3116,21 +3117,22 @@ bool Compiler<Emitter>::VisitCXXNewExpr(const CXXNewExpr *E) {
31163117
if (!this->discard(Arg1))
31173118
return false;
31183119
IsNoThrow = true;
3119-
} else if (Ctx.getLangOpts().CPlusPlus26 &&
3120-
OperatorNew->isReservedGlobalPlacementOperator()) {
3120+
} else {
3121+
// Invalid unless we have C++26 or are in a std:: function.
3122+
if (!this->emitInvalidNewDeleteExpr(E, E))
3123+
return false;
3124+
31213125
// If we have a placement-new destination, we'll later use that instead
31223126
// of allocating.
3123-
PlacementDest = Arg1;
3124-
} else {
3125-
return this->emitInvalidNewDeleteExpr(E, E);
3127+
if (OperatorNew->isReservedGlobalPlacementOperator())
3128+
PlacementDest = Arg1;
31263129
}
3127-
31283130
} else {
3131+
// Always invalid.
31293132
return this->emitInvalid(E);
31303133
}
3131-
} else if (!OperatorNew->isReplaceableGlobalAllocationFunction()) {
3134+
} else if (!OperatorNew->isReplaceableGlobalAllocationFunction())
31323135
return this->emitInvalidNewDeleteExpr(E, E);
3133-
}
31343136

31353137
const Descriptor *Desc;
31363138
if (!PlacementDest) {

clang/lib/AST/ByteCode/Interp.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,6 +1293,13 @@ bool CheckNewTypeMismatch(InterpState &S, CodePtr OpPC, const Expr *E,
12931293
if (!CheckStore(S, OpPC, Ptr))
12941294
return false;
12951295

1296+
if (!InvalidNewDeleteExpr(S, OpPC, E))
1297+
return false;
1298+
1299+
// Assume proper types in std functions.
1300+
if (S.Current->isStdFunction())
1301+
return true;
1302+
12961303
const auto *NewExpr = cast<CXXNewExpr>(E);
12971304
QualType StorageType = Ptr.getType();
12981305

@@ -1334,10 +1341,16 @@ bool InvalidNewDeleteExpr(InterpState &S, CodePtr OpPC, const Expr *E) {
13341341
assert(E);
13351342
const auto &Loc = S.Current->getSource(OpPC);
13361343

1344+
if (S.getLangOpts().CPlusPlus26)
1345+
return true;
1346+
13371347
if (const auto *NewExpr = dyn_cast<CXXNewExpr>(E)) {
13381348
const FunctionDecl *OperatorNew = NewExpr->getOperatorNew();
13391349

13401350
if (!S.getLangOpts().CPlusPlus26 && NewExpr->getNumPlacementArgs() > 0) {
1351+
// This is allowed pre-C++26, but only an std function.
1352+
if (S.Current->isStdFunction())
1353+
return true;
13411354
S.FFDiag(Loc, diag::note_constexpr_new_placement)
13421355
<< /*C++26 feature*/ 1 << E->getSourceRange();
13431356
} else if (NewExpr->getNumPlacementArgs() == 1 &&

clang/lib/AST/ByteCode/InterpBuiltin.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,8 +1345,7 @@ static bool interp__builtin_operator_new(InterpState &S, CodePtr OpPC,
13451345
assert(!ElemT);
13461346
// Structs etc.
13471347
const Descriptor *Desc = S.P.createDescriptor(
1348-
Call, ElemType.getTypePtr(),
1349-
NumElems.ule(1) ? std::nullopt : Descriptor::InlineDescMD,
1348+
Call, ElemType.getTypePtr(), Descriptor::InlineDescMD,
13501349
/*IsConst=*/false, /*IsTemporary=*/false, /*IsMutable=*/false,
13511350
/*Init=*/nullptr);
13521351

clang/lib/AST/ByteCode/InterpFrame.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,3 +257,13 @@ SourceRange InterpFrame::getRange(CodePtr PC) const {
257257

258258
return S.getRange(Func, PC);
259259
}
260+
261+
bool InterpFrame::isStdFunction() const {
262+
if (!Func)
263+
return false;
264+
for (const DeclContext *DC = Func->getDecl(); DC; DC = DC->getParent())
265+
if (DC->isStdNamespace())
266+
return true;
267+
268+
return false;
269+
}

clang/lib/AST/ByteCode/InterpFrame.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ class InterpFrame final : public Frame {
117117

118118
unsigned getDepth() const { return Depth; }
119119

120+
bool isStdFunction() const;
121+
120122
void dump() const { dump(llvm::errs(), 0); }
121123
void dump(llvm::raw_ostream &OS, unsigned Indent = 0) const;
122124

clang/lib/Basic/Targets/BPF.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ void BPFTargetInfo::getTargetDefines(const LangOptions &Opts,
3737
}
3838

3939
Builder.defineMacro("__BPF_FEATURE_ADDR_SPACE_CAST");
40+
Builder.defineMacro("__BPF_FEATURE_MAY_GOTO");
4041

4142
if (CPU.empty())
4243
CPU = "v3";
@@ -48,7 +49,6 @@ void BPFTargetInfo::getTargetDefines(const LangOptions &Opts,
4849

4950
std::string CpuVerNumStr = CPU.substr(1);
5051
Builder.defineMacro("__BPF_CPU_VERSION__", CpuVerNumStr);
51-
Builder.defineMacro("__BPF_FEATURE_MAY_GOTO");
5252

5353
int CpuVerNum = std::stoi(CpuVerNumStr);
5454
if (CpuVerNum >= 2)

clang/lib/Sema/SemaDecl.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9762,26 +9762,26 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC,
97629762
if (getLangOpts().CPlusPlus) {
97639763
// The rules for implicit inlines changed in C++20 for methods and friends
97649764
// with an in-class definition (when such a definition is not attached to
9765-
// the global module). User-specified 'inline' overrides this (set when
9766-
// the function decl is created above).
9765+
// the global module). This does not affect declarations that are already
9766+
// inline (whether explicitly or implicitly by being declared constexpr,
9767+
// consteval, etc).
97679768
// FIXME: We need a better way to separate C++ standard and clang modules.
97689769
bool ImplicitInlineCXX20 = !getLangOpts().CPlusPlusModules ||
9769-
NewFD->isConstexpr() || NewFD->isConsteval() ||
97709770
!NewFD->getOwningModule() ||
97719771
NewFD->isFromGlobalModule() ||
97729772
NewFD->getOwningModule()->isHeaderLikeModule();
97739773
bool isInline = D.getDeclSpec().isInlineSpecified();
97749774
bool isVirtual = D.getDeclSpec().isVirtualSpecified();
97759775
bool hasExplicit = D.getDeclSpec().hasExplicitSpecifier();
97769776
isFriend = D.getDeclSpec().isFriendSpecified();
9777-
if (isFriend && !isInline && D.isFunctionDefinition()) {
9777+
if (ImplicitInlineCXX20 && isFriend && D.isFunctionDefinition()) {
97789778
// Pre-C++20 [class.friend]p5
97799779
// A function can be defined in a friend declaration of a
97809780
// class . . . . Such a function is implicitly inline.
97819781
// Post C++20 [class.friend]p7
97829782
// Such a function is implicitly an inline function if it is attached
97839783
// to the global module.
9784-
NewFD->setImplicitlyInline(ImplicitInlineCXX20);
9784+
NewFD->setImplicitlyInline();
97859785
}
97869786

97879787
// If this is a method defined in an __interface, and is not a constructor
@@ -10083,15 +10083,15 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC,
1008310083
break;
1008410084
}
1008510085

10086-
if (isa<CXXMethodDecl>(NewFD) && DC == CurContext &&
10087-
D.isFunctionDefinition() && !isInline) {
10086+
if (ImplicitInlineCXX20 && isa<CXXMethodDecl>(NewFD) && DC == CurContext &&
10087+
D.isFunctionDefinition()) {
1008810088
// Pre C++20 [class.mfct]p2:
1008910089
// A member function may be defined (8.4) in its class definition, in
1009010090
// which case it is an inline member function (7.1.2)
1009110091
// Post C++20 [class.mfct]p1:
1009210092
// If a member function is attached to the global module and is defined
1009310093
// in its class definition, it is inline.
10094-
NewFD->setImplicitlyInline(ImplicitInlineCXX20);
10094+
NewFD->setImplicitlyInline();
1009510095
}
1009610096

1009710097
if (!isFriend && SC != SC_None) {

clang/test/AST/ByteCode/codegen.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,8 @@
1010
//
1111
// CHECK-NEXT: @.str = {{.*}}constant [13 x i8] c"Hello World!\00", section "__TEXT,__cstring,cstring_literals", align 1
1212
id a = @"Hello World!";
13+
14+
extern void OBJC_CLASS_$_f;
15+
Class c = (Class)&OBJC_CLASS_$_f;
16+
// CHECK: @c ={{.*}} global ptr @"OBJC_CLASS_$_f"
17+
// CHECK: @"OBJC_CLASS_$_f" ={{.*}} global %struct._class_t

clang/test/AST/ByteCode/new-delete.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,10 @@ namespace std {
594594
// both-note {{used to delete a null pointer}}
595595
}
596596
};
597+
template<typename T, typename ...Args>
598+
constexpr void construct_at(void *p, Args &&...args) { // #construct
599+
new (p) T((Args&&)args...);
600+
}
597601
}
598602

599603
/// Specialization for float, using operator new/delete.
@@ -762,6 +766,16 @@ namespace Placement {
762766
}
763767
static_assert(ok1()); // both-error {{not an integral constant expression}} \
764768
// both-note {{in call to}}
769+
770+
/// placement-new should be supported before C++26 in std functions.
771+
constexpr int ok2() {
772+
int *I = new int;
773+
std::construct_at<int>(I);
774+
int r = *I;
775+
delete I;
776+
return r;
777+
}
778+
static_assert(ok2()== 0);
765779
}
766780

767781
#else

clang/test/AST/ByteCode/placement-new.cpp

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@
33

44
namespace std {
55
using size_t = decltype(sizeof(0));
6+
template<typename T> struct allocator {
7+
constexpr T *allocate(size_t N) {
8+
return (T*)operator new(sizeof(T) * N);
9+
}
10+
constexpr void deallocate(void *p) {
11+
operator delete(p);
12+
}
13+
};
14+
template<typename T, typename ...Args>
15+
constexpr void construct_at(void *p, Args &&...args) {
16+
new (p) T((Args&&)args...); // both-note {{in call to}}
17+
}
618
}
719

820
void *operator new(std::size_t, void *p) { return p; }
@@ -217,3 +229,35 @@ namespace records {
217229
}
218230
static_assert(foo() == 0);
219231
}
232+
233+
namespace ConstructAt {
234+
struct S {
235+
int a = 10;
236+
float b = 1.0;
237+
};
238+
239+
constexpr bool ok1() {
240+
S s;
241+
242+
std::construct_at<S>(&s);
243+
return s.a == 10 && s.b == 1.0;
244+
}
245+
static_assert(ok1());
246+
247+
struct S2 {
248+
constexpr S2() {
249+
(void)(1/0); // both-note {{division by zero}} \
250+
// both-warning {{division by zero is undefined}}
251+
}
252+
};
253+
254+
constexpr bool ctorFail() { //
255+
S2 *s = std::allocator<S2>().allocate(1);
256+
std::construct_at<S2>(s); // both-note {{in call to}}
257+
258+
return true;
259+
}
260+
static_assert(ctorFail()); // both-error {{not an integral constant expression}} \
261+
// both-note {{in call to 'ctorFail()'}}
262+
263+
}

clang/test/CXX/class/class.friend/p7-cxx20.cpp

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,51 @@ module;
4646
export module M;
4747

4848
class Z {
49-
friend void z(){};
49+
friend void z1(){};
5050
};
51+
52+
class Inline {
53+
friend inline void z2(){};
54+
};
55+
56+
class Constexpr {
57+
friend constexpr void z3(){};
58+
};
59+
60+
class Consteval {
61+
friend consteval void z4(){};
62+
};
63+
64+
extern "C++" class GlobalModule {
65+
friend void z5(){};
66+
};
67+
5168
// CHECK-MOD: |-CXXRecordDecl {{.*}} <.{{/|\\\\?}}header.h:2:1, line:4:1> line:2:7 in M.<global> hidden class A definition
5269
// CHECK-MOD: | |-CXXRecordDecl {{.*}} <col:1, col:7> col:7 in M.<global> hidden implicit class A
5370
// CHECK-MOD-NEXT: | `-FriendDecl {{.*}} <line:3:3, col:19> col:15 in M.<global>
5471
// CHECK-MOD-NEXT: | `-FunctionDecl {{.*}} parent {{.*}} <col:3, col:19> col:15 in M.<global> hidden friend_undeclared a 'void ()' implicit-inline
5572

56-
// CHECK-MOD: `-CXXRecordDecl {{.*}} <module.cpp:6:1, line:8:1> line:6:7 in M hidden class Z{{( ReachableWhenImported)?}} definition
57-
// CHECK-MOD: |-CXXRecordDecl {{.*}} <col:1, col:7> col:7 in M hidden implicit class Z{{( ReachableWhenImported)?}}
58-
// CHECK-MOD-NEXT: `-FriendDecl {{.*}} <line:7:3, col:19> col:15 in M{{( ReachableWhenImported)?}}
59-
// CHECK-MOD-NEXT: `-FunctionDecl {{.*}} parent {{.*}} <col:3, col:19> col:15 in M hidden friend_undeclared z 'void ()'{{( ReachableWhenImported)?}}
73+
// CHECK-MOD: |-CXXRecordDecl {{.*}} <module.cpp:6:1, line:8:1> line:6:7 in M hidden class Z{{( ReachableWhenImported)?}} definition
74+
// CHECK-MOD: | |-CXXRecordDecl {{.*}} <col:1, col:7> col:7 in M hidden implicit class Z{{( ReachableWhenImported)?}}
75+
// CHECK-MOD-NEXT: | `-FriendDecl {{.*}} <line:7:3, col:20> col:15 in M{{( ReachableWhenImported)?}}
76+
// CHECK-MOD-NEXT: | `-FunctionDecl {{.*}} parent {{.*}} <col:3, col:20> col:15 in M hidden friend_undeclared z1 'void ()'{{( ReachableWhenImported)?}}
77+
78+
// CHECK-MOD: |-CXXRecordDecl {{.*}} <line:10:1, line:12:1> line:10:7 in M hidden class Inline{{( ReachableWhenImported)?}} definition
79+
// CHECK-MOD: | |-CXXRecordDecl {{.*}} <col:1, col:7> col:7 in M hidden implicit class Inline{{( ReachableWhenImported)?}}
80+
// CHECK-MOD-NEXT: | `-FriendDecl {{.*}} <line:11:3, col:27> col:22 in M{{( ReachableWhenImported)?}}
81+
// CHECK-MOD-NEXT: | `-FunctionDecl {{.*}} parent {{.*}} <col:3, col:27> col:22 in M hidden friend_undeclared z2 'void ()'{{( ReachableWhenImported)?}} inline
82+
83+
// CHECK-MOD: |-CXXRecordDecl {{.*}} <line:14:1, line:16:1> line:14:7 in M hidden class Constexpr{{( ReachableWhenImported)?}} definition
84+
// CHECK-MOD: | |-CXXRecordDecl {{.*}} <col:1, col:7> col:7 in M hidden implicit class Constexpr{{( ReachableWhenImported)?}}
85+
// CHECK-MOD-NEXT: | `-FriendDecl {{.*}} <line:15:3, col:30> col:25 in M{{( ReachableWhenImported)?}}
86+
// CHECK-MOD-NEXT: | `-FunctionDecl {{.*}} parent {{.*}} <col:3, col:30> col:25 in M hidden constexpr friend_undeclared z3 'void ()'{{( ReachableWhenImported)?}} implicit-inline
87+
88+
// CHECK-MOD: |-CXXRecordDecl {{.*}} <line:18:1, line:20:1> line:18:7 in M hidden class Consteval{{( ReachableWhenImported)?}} definition
89+
// CHECK-MOD: | |-CXXRecordDecl {{.*}} <col:1, col:7> col:7 in M hidden implicit class Consteval{{( ReachableWhenImported)?}}
90+
// CHECK-MOD-NEXT: | `-FriendDecl {{.*}} <line:19:3, col:30> col:25 in M{{( ReachableWhenImported)?}}
91+
// CHECK-MOD-NEXT: | `-FunctionDecl {{.*}} parent {{.*}} <col:3, col:30> col:25 in M hidden consteval friend_undeclared z4 'void ()'{{( ReachableWhenImported)?}} implicit-inline
92+
93+
// CHECK-MOD: `-CXXRecordDecl {{.*}} <col:14, line:24:1> line:22:20 in M.<implicit global> hidden class GlobalModule{{( ReachableWhenImported)?}} definition
94+
// CHECK-MOD: |-CXXRecordDecl {{.*}} <col:14, col:20> col:20 in M.<implicit global> hidden implicit class GlobalModule{{( ReachableWhenImported)?}}
95+
// CHECK-MOD-NEXT: `-FriendDecl {{.*}} <line:23:3, col:20> col:15 in M.<implicit global>{{( ReachableWhenImported)?}}
96+
// CHECK-MOD-NEXT: `-FunctionDecl {{.*}} parent {{.*}} <col:3, col:20> col:15 in M.<implicit global> hidden friend_undeclared z5 'void ()'{{( ReachableWhenImported)?}} implicit-inline

clang/test/CXX/class/class.mfct/p1-cxx20.cpp

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,42 @@ class Z {
4848
void z(){};
4949
};
5050

51+
class Inline {
52+
inline void z(){};
53+
};
54+
55+
class Constexpr {
56+
constexpr void z(){};
57+
};
58+
59+
class Consteval {
60+
consteval void z(){};
61+
};
62+
63+
extern "C++" class GlobalModule {
64+
void z(){};
65+
};
66+
5167
// CHECK-MOD: |-CXXRecordDecl {{.*}} <.{{/|\\\\?}}header.h:2:1, line:4:1> line:2:7 in M.<global> hidden class A definition
5268
// CHECK-MOD: | |-CXXRecordDecl {{.*}} <col:1, col:7> col:7 in M.<global> hidden implicit class A
5369
// CHECK-MOD-NEXT: | `-CXXMethodDecl {{.*}} <line:3:3, col:12> col:8 in M.<global> hidden a 'void ()' implicit-inline
5470

55-
// CHECK-MOD: `-CXXRecordDecl {{.*}} <module.cpp:6:1, line:8:1> line:6:7 in M hidden class Z{{( ReachableWhenImported)?}} definition
56-
// CHECK-MOD: |-CXXRecordDecl {{.*}} <col:1, col:7> col:7 in M hidden implicit class Z{{( ReachableWhenImported)?}}
57-
// CHECK-MOD-NEXT: `-CXXMethodDecl {{.*}} <line:7:3, col:12> col:8 in M hidden z 'void ()'{{( ReachableWhenImported)?}}
71+
// CHECK-MOD: |-CXXRecordDecl {{.*}} <module.cpp:6:1, line:8:1> line:6:7 in M hidden class Z{{( ReachableWhenImported)?}} definition
72+
// CHECK-MOD: | |-CXXRecordDecl {{.*}} <col:1, col:7> col:7 in M hidden implicit class Z{{( ReachableWhenImported)?}}
73+
// CHECK-MOD-NEXT: | `-CXXMethodDecl {{.*}} <line:7:3, col:12> col:8 in M hidden z 'void ()'{{( ReachableWhenImported)?}}
74+
75+
// CHECK-MOD: |-CXXRecordDecl {{.*}} <line:10:1, line:12:1> line:10:7 in M hidden class Inline{{( ReachableWhenImported)?}} definition
76+
// CHECK-MOD: | |-CXXRecordDecl {{.*}} <col:1, col:7> col:7 in M hidden implicit class Inline{{( ReachableWhenImported)?}}
77+
// CHECK-MOD-NEXT: | `-CXXMethodDecl {{.*}} <line:11:3, col:19> col:15 in M hidden z 'void ()'{{( ReachableWhenImported)?}} inline
78+
79+
// CHECK-MOD: |-CXXRecordDecl {{.*}} <line:14:1, line:16:1> line:14:7 in M hidden class Constexpr{{( ReachableWhenImported)?}} definition
80+
// CHECK-MOD: | |-CXXRecordDecl {{.*}} <col:1, col:7> col:7 in M hidden implicit class Constexpr{{( ReachableWhenImported)?}}
81+
// CHECK-MOD-NEXT: | `-CXXMethodDecl {{.*}} <line:15:3, col:22> col:18 in M hidden constexpr z 'void ()'{{( ReachableWhenImported)?}} implicit-inline
82+
83+
// CHECK-MOD: |-CXXRecordDecl {{.*}} <line:18:1, line:20:1> line:18:7 in M hidden class Consteval{{( ReachableWhenImported)?}} definition
84+
// CHECK-MOD: | |-CXXRecordDecl {{.*}} <col:1, col:7> col:7 in M hidden implicit class Consteval{{( ReachableWhenImported)?}}
85+
// CHECK-MOD-NEXT: | `-CXXMethodDecl {{.*}} <line:19:3, col:22> col:18 in M hidden consteval z 'void ()'{{( ReachableWhenImported)?}} implicit-inline
86+
87+
// CHECK-MOD: `-CXXRecordDecl {{.*}} <col:14, line:24:1> line:22:20 in M.<implicit global> hidden class GlobalModule{{( ReachableWhenImported)?}} definition
88+
// CHECK-MOD: |-CXXRecordDecl {{.*}} <col:14, col:20> col:20 in M.<implicit global> hidden implicit class GlobalModule{{( ReachableWhenImported)?}}
89+
// CHECK-MOD-NEXT: `-CXXMethodDecl {{.*}} <line:23:3, col:12> col:8 in M.<implicit global> hidden z 'void ()'{{( ReachableWhenImported)?}} implicit-inline

clang/test/Preprocessor/bpf-predefined-macros.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ int s;
6464
#ifdef __BPF_FEATURE_ADDR_SPACE_CAST
6565
int t;
6666
#endif
67+
#ifdef __BPF_FEATURE_MAY_GOTO
68+
int u;
69+
#endif
6770

6871
// CHECK: int b;
6972
// CHECK: int c;
@@ -98,6 +101,11 @@ int t;
98101
// CPU_V3: int t;
99102
// CPU_V4: int t;
100103

104+
// CPU_V1: int u;
105+
// CPU_V2: int u;
106+
// CPU_V3: int u;
107+
// CPU_V4: int u;
108+
101109
// CPU_GENERIC: int g;
102110

103111
// CPU_PROBE: int f;

0 commit comments

Comments
 (0)