Skip to content

Commit e33ada5

Browse files
committed
Merge from 'main' to 'sycl-web' (59 commits)
CONFLICT (content): Merge conflict in llvm/lib/Transforms/Utils/BuildLibCalls.cpp
2 parents b0f0f8f + f205950 commit e33ada5

File tree

317 files changed

+12062
-6820
lines changed

Some content is hidden

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

317 files changed

+12062
-6820
lines changed

bolt/include/bolt/Rewrite/RewriteInstance.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -400,12 +400,6 @@ class RewriteInstance {
400400
/// Manage a pipeline of metadata handlers.
401401
class MetadataManager MetadataManager;
402402

403-
/// Get the contents of the LSDA section for this binary.
404-
ArrayRef<uint8_t> getLSDAData();
405-
406-
/// Get the mapped address of the LSDA section for this binary.
407-
uint64_t getLSDAAddress();
408-
409403
static const char TimerGroupName[];
410404

411405
static const char TimerGroupDesc[];
@@ -550,7 +544,6 @@ class RewriteInstance {
550544
}
551545

552546
/// Exception handling and stack unwinding information in this binary.
553-
ErrorOr<BinarySection &> LSDASection{std::errc::bad_address};
554547
ErrorOr<BinarySection &> EHFrameSection{std::errc::bad_address};
555548

556549
/// .note.gnu.build-id section.

bolt/lib/Rewrite/RewriteInstance.cpp

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1784,13 +1784,6 @@ void RewriteInstance::relocateEHFrameSection() {
17841784
check_error(std::move(E), "failed to patch EH frame");
17851785
}
17861786

1787-
ArrayRef<uint8_t> RewriteInstance::getLSDAData() {
1788-
return ArrayRef<uint8_t>(LSDASection->getData(),
1789-
LSDASection->getContents().size());
1790-
}
1791-
1792-
uint64_t RewriteInstance::getLSDAAddress() { return LSDASection->getAddress(); }
1793-
17941787
Error RewriteInstance::readSpecialSections() {
17951788
NamedRegionTimer T("readSpecialSections", "read special sections",
17961789
TimerGroupName, TimerGroupDesc, opts::TimeRewrite);
@@ -1829,7 +1822,6 @@ Error RewriteInstance::readSpecialSections() {
18291822

18301823
HasTextRelocations = (bool)BC->getUniqueSectionByName(".rela.text");
18311824
HasSymbolTable = (bool)BC->getUniqueSectionByName(".symtab");
1832-
LSDASection = BC->getUniqueSectionByName(".gcc_except_table");
18331825
EHFrameSection = BC->getUniqueSectionByName(".eh_frame");
18341826
BuildIDSection = BC->getUniqueSectionByName(".note.gnu.build-id");
18351827

@@ -3200,8 +3192,14 @@ void RewriteInstance::disassembleFunctions() {
32003192

32013193
// Parse LSDA.
32023194
if (Function.getLSDAAddress() != 0 &&
3203-
!BC->getFragmentsToSkip().count(&Function))
3204-
Function.parseLSDA(getLSDAData(), getLSDAAddress());
3195+
!BC->getFragmentsToSkip().count(&Function)) {
3196+
ErrorOr<BinarySection &> LSDASection =
3197+
BC->getSectionForAddress(Function.getLSDAAddress());
3198+
check_error(LSDASection.getError(), "failed to get LSDA section");
3199+
ArrayRef<uint8_t> LSDAData = ArrayRef<uint8_t>(
3200+
LSDASection->getData(), LSDASection->getContents().size());
3201+
Function.parseLSDA(LSDAData, LSDASection->getAddress());
3202+
}
32053203
}
32063204
}
32073205

bolt/test/Inputs/lsda.ldscript

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
SECTIONS {
2+
.text : { *(.text*) }
3+
.gcc_except_table.main : { *(.gcc_except_table*) }
4+
. = 0x20000;
5+
.eh_frame : { *(.eh_frame) }
6+
. = 0x80000;
7+
}

bolt/test/lsda.cpp

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// This test check that LSDA section named by .gcc_except_table.main is
2+
// disassembled by BOLT.
3+
4+
// RUN: %clang++ %cxxflags -O3 -flto=thin -no-pie -c %s -o %t.o
5+
// RUN: %clang++ %cxxflags -flto=thin -no-pie -fuse-ld=lld %t.o -o %t.exe \
6+
// RUN: -Wl,-q -Wl,--script=%S/Inputs/lsda.ldscript
7+
// RUN: llvm-readelf -SW %t.exe | FileCheck %s
8+
// RUN: llvm-bolt %t.exe -o %t.bolt
9+
10+
// CHECK: .gcc_except_table.main
11+
12+
#include <iostream>
13+
14+
class MyException : public std::exception {
15+
public:
16+
const char *what() const throw() {
17+
return "Custom Exception: an error occurred!";
18+
}
19+
};
20+
21+
int divide(int a, int b) {
22+
if (b == 0) {
23+
throw MyException();
24+
}
25+
return a / b;
26+
}
27+
28+
int main() {
29+
try {
30+
int result = divide(10, 2); // normal case
31+
std::cout << "Result: " << result << std::endl;
32+
result = divide(5, 0); // will cause exception
33+
std::cout << "Result: " << result << std::endl;
34+
// this line will not execute
35+
} catch (const MyException &e) {
36+
// catch custom exception
37+
std::cerr << "Caught exception: " << e.what() << std::endl;
38+
} catch (const std::exception &e) {
39+
// catch other C++ exceptions
40+
std::cerr << "Caught exception: " << e.what() << std::endl;
41+
} catch (...) {
42+
// catch all other exceptions
43+
std::cerr << "Caught unknown exception" << std::endl;
44+
}
45+
46+
return 0;
47+
}

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6472,7 +6472,7 @@ def warn_superclass_variable_sized_type_not_at_end : Warning<
64726472
" in superclass %3">, InGroup<ObjCFlexibleArray>;
64736473

64746474
def err_counted_by_attr_not_on_flexible_array_member : Error<
6475-
"'counted_by' only applies to flexible array members">;
6475+
"'counted_by' only applies to C99 flexible array members">;
64766476
def err_counted_by_attr_refers_to_flexible_array : Error<
64776477
"'counted_by' cannot refer to the flexible array %0">;
64786478
def err_counted_by_must_be_in_structure : Error<

clang/include/clang/Driver/Options.td

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7100,9 +7100,6 @@ def vectorize_loops : Flag<["-"], "vectorize-loops">,
71007100
def vectorize_slp : Flag<["-"], "vectorize-slp">,
71017101
HelpText<"Run the SLP vectorization passes">,
71027102
MarshallingInfoFlag<CodeGenOpts<"VectorizeSLP">>;
7103-
def dependent_lib : Joined<["--"], "dependent-lib=">,
7104-
HelpText<"Add dependent library">,
7105-
MarshallingInfoStringVector<CodeGenOpts<"DependentLibraries">>;
71067103
def linker_option : Joined<["--"], "linker-option=">,
71077104
HelpText<"Add linker option">,
71087105
MarshallingInfoStringVector<CodeGenOpts<"LinkerOptions">>;
@@ -7682,6 +7679,11 @@ def pic_is_pie : Flag<["-"], "pic-is-pie">,
76827679
HelpText<"File is for a position independent executable">,
76837680
MarshallingInfoFlag<LangOpts<"PIE">>;
76847681

7682+
7683+
def dependent_lib : Joined<["--"], "dependent-lib=">,
7684+
HelpText<"Add dependent library">,
7685+
MarshallingInfoStringVector<CodeGenOpts<"DependentLibraries">>;
7686+
76857687
} // let Visibility = [CC1Option, FC1Option]
76867688

76877689
let Visibility = [CC1Option] in {

clang/lib/AST/DeclBase.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,9 +421,6 @@ bool Decl::isFlexibleArrayMemberLike(
421421
using FAMKind = LangOptions::StrictFlexArraysLevelKind;
422422

423423
llvm::APInt Size = CAT->getSize();
424-
FAMKind StrictFlexArraysLevel =
425-
Ctx.getLangOpts().getStrictFlexArraysLevel();
426-
427424
if (StrictFlexArraysLevel == FAMKind::IncompleteOnly)
428425
return false;
429426

clang/lib/AST/Interp/Pointer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ class Pointer {
279279
return getFieldDesc()->isUnknownSizeArray();
280280
}
281281
/// Checks if the pointer points to an array.
282-
bool isArrayElement() const { return Base != Offset; }
282+
bool isArrayElement() const { return inArray() && Base != Offset; }
283283
/// Pointer points directly to a block.
284284
bool isRoot() const {
285285
return (Base == 0 || Base == RootPtrMark) && Offset == 0;

clang/lib/CodeGen/CGDebugInfo.cpp

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1732,10 +1732,13 @@ CGDebugInfo::CreateRecordStaticField(const VarDecl *Var, llvm::DIType *RecordTy,
17321732
StringRef VName = Var->getName();
17331733

17341734
llvm::DINode::DIFlags Flags = getAccessFlag(Var->getAccess(), RD);
1735+
auto Tag = CGM.getCodeGenOpts().DwarfVersion >= 5
1736+
? llvm::dwarf::DW_TAG_variable
1737+
: llvm::dwarf::DW_TAG_member;
17351738
auto Align = getDeclAlignIfRequired(Var, CGM.getContext());
1736-
llvm::DIDerivedType *GV = DBuilder.createStaticMemberType(
1737-
RecordTy, VName, VUnit, LineNumber, VTy, Flags, /* Val */ nullptr,
1738-
llvm::dwarf::DW_TAG_member, Align);
1739+
llvm::DIDerivedType *GV =
1740+
DBuilder.createStaticMemberType(RecordTy, VName, VUnit, LineNumber, VTy,
1741+
Flags, /* Val */ nullptr, Tag, Align);
17391742
StaticDataMemberCache[Var->getCanonicalDecl()].reset(GV);
17401743
StaticDataMemberDefinitionsToEmit.push_back(Var->getCanonicalDecl());
17411744
return GV;
@@ -5883,8 +5886,13 @@ void CGDebugInfo::setDwoId(uint64_t Signature) {
58835886
}
58845887

58855888
void CGDebugInfo::finalize() {
5886-
for (auto const *VD : StaticDataMemberDefinitionsToEmit) {
5887-
assert(VD->isStaticDataMember());
5889+
// We can't use a for-each here because `EmitGlobalVariable`
5890+
// may push new decls into `StaticDataMemberDefinitionsToEmit`,
5891+
// which would invalidate any iterator.
5892+
for (size_t i = 0; i < StaticDataMemberDefinitionsToEmit.size(); ++i) {
5893+
auto const *VD = StaticDataMemberDefinitionsToEmit[i];
5894+
5895+
assert(VD && VD->isStaticDataMember());
58885896

58895897
if (DeclCache.contains(VD))
58905898
continue;

clang/lib/Driver/ToolChains/NetBSD.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ void netbsd::Linker::ConstructJob(Compilation &C, const JobAction &JA,
269269

270270
Args.addAllArgs(CmdArgs, {options::OPT_L, options::OPT_T_Group,
271271
options::OPT_s, options::OPT_t, options::OPT_r});
272+
ToolChain.AddFilePathLibArgs(Args, CmdArgs);
272273

273274
bool NeedsSanitizerDeps = addSanitizerRuntimes(ToolChain, Args, CmdArgs);
274275
bool NeedsXRayDeps = addXRayRuntime(ToolChain, Args, CmdArgs);

clang/lib/Driver/ToolChains/ZOS.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ void zos::Linker::ConstructJob(Compilation &C, const JobAction &JA,
143143
StringRef OutputName = Output.getFilename();
144144
// Strip away the last file suffix in presence from output name and add
145145
// a new .x suffix.
146-
size_t Suffix = OutputName.find_last_of(".");
146+
size_t Suffix = OutputName.find_last_of('.');
147147
const char *SideDeckName =
148148
Args.MakeArgString(OutputName.substr(0, Suffix) + ".x");
149149
CmdArgs.push_back("-x");

clang/lib/Sema/SemaDeclAttr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11193,7 +11193,7 @@ bool Sema::CheckCountedByAttr(Scope *S, const FieldDecl *FD) {
1119311193
}
1119411194

1119511195
LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel =
11196-
Context.getLangOpts().getStrictFlexArraysLevel();
11196+
LangOptions::StrictFlexArraysLevelKind::IncompleteOnly;
1119711197

1119811198
if (!Decl::isFlexibleArrayMemberLike(Context, FD, FD->getType(),
1119911199
StrictFlexArraysLevel, true)) {

clang/test/CodeGenCXX/debug-info-static-inline-member.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %clangxx -target arm64-apple-macosx11.0.0 -g -debug-info-kind=standalone %s -emit-llvm -S -o - | FileCheck --check-prefixes=CHECK %s
2-
// RUN: %clangxx -target arm64-apple-macosx11.0.0 -g -debug-info-kind=limited %s -emit-llvm -S -o - | FileCheck --check-prefixes=CHECK %s
1+
// RUN: %clangxx -target arm64-apple-macosx11.0.0 -g -gdwarf-4 -debug-info-kind=standalone %s -emit-llvm -S -o - | FileCheck --check-prefixes=CHECK %s
2+
// RUN: %clangxx -target arm64-apple-macosx11.0.0 -g -gdwarf-4 -debug-info-kind=limited %s -emit-llvm -S -o - | FileCheck --check-prefixes=CHECK %s
33

44
enum class Enum : int {
55
VAL = -1

clang/test/CodeGenCXX/debug-info-static-member.cpp

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
// RUN: %clangxx -target x86_64-unknown-unknown -g %s -emit-llvm -S -o - | FileCheck --check-prefixes=CHECK,NOT-MS %s
2-
// RUN: %clangxx -target x86_64-unknown-unknown -g -std=c++98 %s -emit-llvm -S -o - | FileCheck --check-prefixes=CHECK,NOT-MS %s
3-
// RUN: %clangxx -target x86_64-unknown-unknown -g -std=c++11 %s -emit-llvm -S -o - | FileCheck --check-prefixes=CHECK,NOT-MS %s
4-
// RUN: %clangxx -target x86_64-windows-msvc -g %s -emit-llvm -S -o - | FileCheck --check-prefixes=CHECK %s
1+
// RUN: %clangxx -target x86_64-unknown-unknown -g -gdwarf-4 %s -emit-llvm -S -o - | FileCheck --check-prefixes=CHECK,DWARF4,NOT-MS %s
2+
// RUN: %clangxx -target x86_64-unknown-unknown -g -gdwarf-4 -std=c++98 %s -emit-llvm -S -o - | FileCheck --check-prefixes=CHECK,DWARF4,NOT-MS %s
3+
// RUN: %clangxx -target x86_64-unknown-unknown -g -gdwarf-4 -std=c++11 %s -emit-llvm -S -o - | FileCheck --check-prefixes=CHECK,DWARF4,NOT-MS %s
4+
// RUN: %clangxx -target x86_64-unknown-unknown -g -gdwarf-5 -std=c++11 %s -emit-llvm -S -o - | FileCheck --check-prefixes=CHECK,DWARF5 %s
5+
// RUN: %clangxx -target x86_64-windows-msvc -g -gdwarf-4 %s -emit-llvm -S -o - | FileCheck --check-prefixes=CHECK,DWARF4 %s
56
// PR14471
67

78
// CHECK: @{{.*}}a{{.*}} = dso_local global i32 4, align 4, !dbg [[A:![0-9]+]]
@@ -39,58 +40,67 @@ class C
3940
//
4041
// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "X"{{.*}})
4142
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "anon_static_decl_struct"
42-
// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "anon_static_decl_var"
43+
// DWARF4: !DIDerivedType(tag: DW_TAG_member, name: "anon_static_decl_var"
44+
// DWARF5: !DIDerivedType(tag: DW_TAG_variable, name: "anon_static_decl_var"
4345
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "static_decl_templ<int>"
4446
// CHECK-NOT: DIFlagFwdDecl
4547
// CHECK-SAME: ){{$}}
46-
// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "static_decl_templ_var"
48+
// DWARF4: !DIDerivedType(tag: DW_TAG_member, name: "static_decl_templ_var"
49+
// DWARF5: !DIDerivedType(tag: DW_TAG_variable, name: "static_decl_templ_var"
4750

4851
int C::a = 4;
4952
// CHECK: [[B]] = !DIGlobalVariableExpression(var: [[BV:.*]], expr: !DIExpression())
5053
// CHECK: [[BV]] = distinct !DIGlobalVariable(name: "b",
5154
// CHECK-SAME: declaration: ![[DECL_B:[0-9]+]])
52-
// CHECK: ![[DECL_B]] = !DIDerivedType(tag: DW_TAG_member, name: "b"
55+
// DWARF4: ![[DECL_B]] = !DIDerivedType(tag: DW_TAG_member, name: "b"
56+
// DWARF5: ![[DECL_B]] = !DIDerivedType(tag: DW_TAG_variable, name: "b"
5357
// CHECK-NOT: size:
5458
// CHECK-NOT: align:
5559
// CHECK-NOT: offset:
5660
// CHECK-SAME: flags: DIFlagProtected | DIFlagStaticMember)
5761
//
5862
// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "C"{{.*}})
5963
//
60-
// CHECK: ![[DECL_A]] = !DIDerivedType(tag: DW_TAG_member, name: "a"
64+
// DWARF4: ![[DECL_A]] = !DIDerivedType(tag: DW_TAG_member, name: "a"
65+
// DWARF5: ![[DECL_A]] = !DIDerivedType(tag: DW_TAG_variable, name: "a"
6166
// CHECK-NOT: size:
6267
// CHECK-NOT: align:
6368
// CHECK-NOT: offset:
6469
// CHECK-SAME: flags: DIFlagStaticMember)
6570
//
66-
// CHECK: ![[CONST_A_DECL:[0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "const_a"
71+
// DWARF4: ![[CONST_A_DECL:[0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "const_a"
72+
// DWARF5: ![[CONST_A_DECL:[0-9]+]] = !DIDerivedType(tag: DW_TAG_variable, name: "const_a"
6773
// CHECK-NOT: size:
6874
// CHECK-NOT: align:
6975
// CHECK-NOT: offset:
7076
// CHECK-SAME: flags: DIFlagStaticMember
7177
// CHECK-NOT: extraData:
7278

73-
// CHECK: ![[CONST_B_DECL:[0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "const_b"
79+
// DWARF4: ![[CONST_B_DECL:[0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "const_b"
80+
// DWARF5: ![[CONST_B_DECL:[0-9]+]] = !DIDerivedType(tag: DW_TAG_variable, name: "const_b"
7481
// CHECK-NOT: size:
7582
// CHECK-NOT: align:
7683
// CHECK-NOT: offset:
7784
// CHECK-SAME: flags: DIFlagProtected | DIFlagStaticMember
7885
// CHECK-NOT: extraData:
7986

80-
// CHECK: ![[DECL_C:[0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "c"
87+
// DWARF4: ![[DECL_C:[0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "c"
88+
// DWARF5: ![[DECL_C:[0-9]+]] = !DIDerivedType(tag: DW_TAG_variable, name: "c"
8189
// CHECK-NOT: size:
8290
// CHECK-NOT: align:
8391
// CHECK-NOT: offset:
8492
// CHECK-SAME: flags: DIFlagPublic | DIFlagStaticMember)
8593
//
86-
// CHECK: ![[CONST_C_DECL:[0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "const_c"
94+
// DWARF4: ![[CONST_C_DECL:[0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "const_c"
95+
// DWARF5: ![[CONST_C_DECL:[0-9]+]] = !DIDerivedType(tag: DW_TAG_variable, name: "const_c"
8796
// CHECK-NOT: size:
8897
// CHECK-NOT: align:
8998
// CHECK-NOT: offset:
9099
// CHECK-SAME: flags: DIFlagPublic | DIFlagStaticMember
91100
// CHECK-NOT: extraData:
92101
//
93-
// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "x_a"
102+
// DWARF4: !DIDerivedType(tag: DW_TAG_member, name: "x_a"
103+
// DWARF5: !DIDerivedType(tag: DW_TAG_variable, name: "x_a"
94104
// CHECK-SAME: flags: DIFlagPublic | DIFlagStaticMember)
95105

96106
int C::b = 2;

clang/test/Driver/netbsd.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@
134134
// STATIC-NOT: "-shared"
135135
// STATIC: "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
136136
// STATIC: "{{.*}}/usr/lib{{/|\\\\}}crti.o" "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o"
137+
// STATIC: "-L{{.*}}/usr/lib"
137138
// STATIC: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
138139

139140
// STATIC-PIE: ld{{.*}}" "--eh-frame-hdr"
@@ -144,13 +145,15 @@
144145
// STATIC-PIE-NOT: "-shared"
145146
// STATIC-PIE: "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
146147
// STATIC-PIE: "{{.*}}/usr/lib{{/|\\\\}}crti.o" "{{.*}}/usr/lib{{/|\\\\}}crtbeginS.o"
148+
// STATIC-PIE: "-L{{.*}}/usr/lib"
147149
// STATIC-PIE: "{{.*}}/usr/lib{{/|\\\\}}crtendS.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
148150

149151
// SHARED: ld{{.*}}" "--eh-frame-hdr"
150152
// SHARED-NOT: "-pie"
151153
// SHARED-NOT: "-dynamic-linker"
152154
// SHARED-NOT: "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
153155
// SHARED: "{{.*}}/usr/lib{{/|\\\\}}crti.o" "{{.*}}/usr/lib{{/|\\\\}}crtbeginS.o"
156+
// SHARED: "-L{{.*}}/usr/lib"
154157
// SHARED: "{{.*}}/usr/lib{{/|\\\\}}crtendS.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
155158

156159
// PIE: ld{{.*}}" "--eh-frame-hdr"
@@ -159,6 +162,7 @@
159162
// PIE-NOT: "-shared"
160163
// PIE: "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
161164
// PIE: "{{.*}}/usr/lib{{/|\\\\}}crtbeginS.o"
165+
// PIE: "-L{{.*}}/usr/lib"
162166
// PIE: "{{.*}}/usr/lib{{/|\\\\}}crtendS.o"
163167
// PIE: "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
164168

clang/test/Sema/attr-counted-by.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fstrict-flex-arrays=3 -fsyntax-only -verify %s
1+
// RUN: %clang_cc1 -fsyntax-only -verify %s
22

33
#define __counted_by(f) __attribute__((counted_by(f)))
44

@@ -38,7 +38,12 @@ struct array_of_ints_count {
3838

3939
struct not_a_fam {
4040
int count;
41-
struct bar *non_fam __counted_by(count); // expected-error {{'counted_by' only applies to flexible array members}}
41+
struct bar *non_fam __counted_by(count); // expected-error {{'counted_by' only applies to C99 flexible array members}}
42+
};
43+
44+
struct not_a_c99_fam {
45+
int count;
46+
struct bar *non_c99_fam[0] __counted_by(count); // expected-error {{'counted_by' only applies to C99 flexible array members}}
4247
};
4348

4449
struct annotated_with_anon_struct {

compiler-rt/test/builtins/Unit/divtc3_test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
// REQUIRES: c99-complex
44

55
//
6-
// Bug 42493
7-
// XFAIL: sparc-target-arch
6+
// This test should be XFAILed on 32-bit sparc (sparc-target-arch, Issue
7+
// #41838), but that is currently hidden, which caused an XPASS (Issue #72398).
88
//
99
#include <stdio.h>
1010

flang/docs/OptionComparison.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
# Compiler options comparison
1010

11-
This document catalogs the options processed by F18's peers/competitors. Much of the document is taken up by a set of tables that list the options categorized into different topics. Some of the table headings link to more information about the contents of the tables. For example, the table on **Standards conformance** options links to [notes on Standards conformance](#standards).
11+
This document catalogs the options processed by F18's peers/competitors. Much of the document is taken up by a set of tables that list the options categorized into different topics. Some of the table headings link to more information about the contents of the tables. For example, the table on **Standards conformance** options links to <a href=#standards">notes on Standards conformance</a>.
1212

1313
**There's also important information in the ___[Appendix section](#appendix)___ near the end of the document on how this data was gathered and what ___is___ and ___is not___ included in this document.**
1414

0 commit comments

Comments
 (0)