Skip to content

Commit a0a5f1c

Browse files
SC llvm teamSC llvm team
authored andcommitted
Merged main:9d10fbbb299e into amd-gfx:accfac824752
Local branch amd-gfx accfac8 Merged main:ec10c36b0776 into amd-gfx:10a6f7e42f1c Remote branch main 9d10fbb Fix test clang/test/Driver/cl-offload.cu
2 parents accfac8 + 9d10fbb commit a0a5f1c

File tree

60 files changed

+479
-50
lines changed

Some content is hidden

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

60 files changed

+479
-50
lines changed

clang/test/Driver/cl-offload.cu

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// REQUIRES: !system-darwin
2+
3+
// The test cannot be run on Darwin because /Users will be treated as a MSVC option.
4+
15
// RUN: %clang_cl -### -target x86_64-pc-windows-msvc --offload-arch=sm_35 -fgpu-rdc \
26
// RUN: --cuda-path=%S/Inputs/CUDA/usr/local/cuda \
37
// RUN: /Wall -x cuda %s 2>&1 \

flang/lib/Semantics/resolve-directives.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -913,6 +913,10 @@ Symbol *AccAttributeVisitor::ResolveFctName(const parser::Name &name) {
913913
Symbol *prev{currScope().FindSymbol(name.source)};
914914
if (!prev || (prev && prev->IsFuncResult())) {
915915
prev = currScope().parent().FindSymbol(name.source);
916+
if (!prev) {
917+
prev = &context_.globalScope().MakeSymbol(
918+
name.source, Attrs{}, ProcEntityDetails{});
919+
}
916920
}
917921
if (prev != name.symbol) {
918922
name.symbol = prev;
@@ -965,7 +969,7 @@ void AccAttributeVisitor::AddRoutineInfoToSymbol(
965969
std::get_if<Fortran::parser::AccClause::Bind>(&clause.u)) {
966970
if (const auto *name =
967971
std::get_if<Fortran::parser::Name>(&bindClause->v.u)) {
968-
if (Symbol *sym = ResolveName(*name, true)) {
972+
if (Symbol *sym = ResolveFctName(*name)) {
969973
info.set_bindName(sym->name().ToString());
970974
} else {
971975
context_.Say((*name).source,
@@ -1008,7 +1012,7 @@ bool AccAttributeVisitor::Pre(const parser::OpenACCRoutineConstruct &x) {
10081012

10091013
bool AccAttributeVisitor::Pre(const parser::AccBindClause &x) {
10101014
if (const auto *name{std::get_if<parser::Name>(&x.u)}) {
1011-
if (!ResolveName(*name, true)) {
1015+
if (!ResolveFctName(*name)) {
10121016
context_.Say(name->source,
10131017
"No function or subroutine declared for '%s'"_err_en_US,
10141018
name->source);

flang/test/Lower/OpenACC/acc-routine.f90

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,14 @@ subroutine acc_routine11(a)
9696
end interface
9797

9898
end subroutine
99+
100+
subroutine acc_routine13()
101+
!$acc routine bind(acc_routine14)
102+
end subroutine
103+
104+
subroutine acc_routine14()
105+
end subroutine
106+
107+
subroutine acc_routine15()
108+
!$acc routine bind(acc_routine16)
109+
end subroutine

flang/test/Semantics/OpenACC/acc-routine-validity.f90

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ module openacc_routine_validity
1515
!ERROR: ROUTINE directive without name must appear within the specification part of a subroutine or function definition, or within an interface body for a subroutine or function in an interface block
1616
!$acc routine seq
1717

18-
!ERROR: No function or subroutine declared for 'dummy'
1918
!$acc routine(dummy) seq
2019

2120
contains
@@ -70,7 +69,6 @@ end function fct4
7069

7170
subroutine sub6(a)
7271
real :: a(:)
73-
!ERROR: No function or subroutine declared for 'dummy_sub'
7472
!$acc routine seq bind(dummy_sub)
7573
end subroutine sub6
7674

libcxx/docs/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ Target platform Target architecture Notes
130130
macOS 10.9+ i386, x86_64, arm64 Building the shared library itself requires targetting macOS 10.13+
131131
FreeBSD 12+ i386, x86_64, arm
132132
Linux i386, x86_64, arm, arm64 Only glibc-2.24 and later and no other libc is officially supported
133-
Android 5.0+ i386, x86_64, arm, arm64
134133
Windows i386, x86_64 Both MSVC and MinGW style environments, ABI in MSVC environments is :doc:`unstable <DesignDocs/ABIVersioning>`
135134
AIX 7.2TL5+ powerpc, powerpc64
136135
=============== ========================= ============================

libcxx/test/libcxx/clang_modules_include.gen.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
// UNSUPPORTED{BLOCKLIT}: LIBCXX-AIX-FIXME
3535
3636
// The Android headers don't appear to be compatible with modules yet
37-
// XFAIL{BLOCKLIT}: LIBCXX-ANDROID-FIXME
37+
// UNSUPPORTED{BLOCKLIT}: LIBCXX-ANDROID-FIXME
3838
3939
// TODO: Investigate this failure
4040
// UNSUPPORTED{BLOCKLIT}: LIBCXX-FREEBSD-FIXME
@@ -64,7 +64,7 @@
6464
// UNSUPPORTED{BLOCKLIT}: LIBCXX-AIX-FIXME
6565
6666
// The Android headers don't appear to be compatible with modules yet
67-
// XFAIL{BLOCKLIT}: LIBCXX-ANDROID-FIXME
67+
// UNSUPPORTED{BLOCKLIT}: LIBCXX-ANDROID-FIXME
6868
6969
// TODO: Investigate this failure
7070
// UNSUPPORTED{BLOCKLIT}: LIBCXX-FREEBSD-FIXME

libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717
// TODO: Investigate this failure on GCC 13 (in Ubuntu Jammy)
1818
// UNSUPPORTED: gcc-13
1919

20+
// The Android libc++ tests are run on a non-Android host, connected to an
21+
// Android device over adb. gdb needs special support to make this work (e.g.
22+
// gdbclient.py, ndk-gdb.py, gdbserver), and the Android organization doesn't
23+
// support gdb anymore, favoring lldb instead.
24+
// UNSUPPORTED: android
25+
2026
// RUN: %{cxx} %{flags} %s -o %t.exe %{compile_flags} -g %{link_flags}
2127
// Ensure locale-independence for unicode tests.
2228
// RUN: env LANG=en_US.UTF-8 %{gdb} -nx -batch -iex "set autoload off" -ex "source %S/../../../utils/gdb/libcxx/printers.py" -ex "python register_libcxx_printer_loader()" -ex "source %S/gdb_pretty_printer_test.py" %t.exe

libcxx/test/libcxx/input.output/iostream.format/print.fun/vprint_unicode_posix.pass.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111

1212
// XFAIL: availability-fp_to_chars-missing
1313

14+
// fmemopen is available starting in Android M (API 23)
15+
// XFAIL: target={{.+}}-android{{(eabi)?(21|22)}}
16+
1417
// REQUIRES: has-unix-headers
1518

1619
// <print>

libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/close.pass.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010

1111
// basic_filebuf<charT,traits>* close();
1212

13+
// This test closes an fd that belongs to a std::filebuf, and Bionic's fdsan
14+
// detects this and aborts the process, starting in Android R (API 30).
15+
// See D137129.
16+
// XFAIL: LIBCXX-ANDROID-FIXME && !android-device-api={{2[1-9]}}
17+
1318
#include <fstream>
1419
#include <cassert>
1520
#if defined(__unix__)

libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_size.pass.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
// against already-released libc++'s.
1313
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.15|11.0}}
1414

15+
// Starting in Android N (API 24), SELinux policy prevents the shell user from
16+
// creating a FIFO file.
17+
// XFAIL: LIBCXX-ANDROID-FIXME && !android-device-api={{21|22|23}}
18+
1519
// <filesystem>
1620

1721
// class directory_entry

libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_type_obs.pass.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

99
// UNSUPPORTED: c++03
1010

11+
// Starting in Android N (API 24), SELinux policy prevents the shell user from
12+
// creating a hard link.
13+
// XFAIL: LIBCXX-ANDROID-FIXME && !android-device-api={{21|22|23}}
14+
1115
// <filesystem>
1216

1317
// class directory_entry

libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/hard_link_count.pass.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
// against already-released libc++'s.
1313
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.15|11.0}}
1414

15+
// Starting in Android N (API 24), SELinux policy prevents the shell user from
16+
// creating a hard link.
17+
// XFAIL: LIBCXX-ANDROID-FIXME && !android-device-api={{21|22|23}}
18+
1519
// <filesystem>
1620

1721
// class directory_entry

libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
// UNSUPPORTED: no-filesystem
1111
// UNSUPPORTED: availability-filesystem-missing
1212

13+
// On Android L, ~scoped_test_env() is unable to delete the temp dir using
14+
// chmod+rm because chmod is too broken.
15+
// XFAIL: LIBCXX-ANDROID-FIXME && android-device-api={{21|22}}
16+
1317
// <filesystem>
1418

1519
// class recursive_directory_iterator

libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy/copy.pass.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
// UNSUPPORTED: no-filesystem
1111
// UNSUPPORTED: availability-filesystem-missing
1212

13+
// Starting in Android N (API 24), SELinux policy prevents the shell user from
14+
// creating a FIFO file.
15+
// XFAIL: LIBCXX-ANDROID-FIXME && !android-device-api={{21|22|23}}
16+
1317
// <filesystem>
1418

1519
// void copy(const path& from, const path& to);

libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
// against already-released libc++'s.
1515
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.15|11.0}}
1616

17+
// Starting in Android N (API 24), SELinux policy prevents the shell user from
18+
// creating a FIFO file.
19+
// XFAIL: LIBCXX-ANDROID-FIXME && !android-device-api={{21|22|23}}
20+
1721
// <filesystem>
1822

1923
// bool copy_file(const path& from, const path& to);

libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_hard_link/create_hard_link.pass.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
// UNSUPPORTED: no-filesystem
1111
// UNSUPPORTED: availability-filesystem-missing
1212

13+
// Starting in Android N (API 24), SELinux policy prevents the shell user from
14+
// creating a hard link.
15+
// XFAIL: LIBCXX-ANDROID-FIXME && !android-device-api={{21|22|23}}
16+
1317
// <filesystem>
1418

1519
// void create_hard_link(const path& existing_symlink, const path& new_symlink);

libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.equivalent/equivalent.pass.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
// UNSUPPORTED: no-filesystem
1111
// UNSUPPORTED: availability-filesystem-missing
1212

13+
// Starting in Android N (API 24), SELinux policy prevents the shell user from
14+
// creating a hard link.
15+
// XFAIL: LIBCXX-ANDROID-FIXME && !android-device-api={{21|22|23}}
16+
1317
// <filesystem>
1418

1519
// bool equivalent(path const& lhs, path const& rhs);

libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.hard_lk_ct/hard_link_count.pass.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
// UNSUPPORTED: no-filesystem
1111
// UNSUPPORTED: availability-filesystem-missing
1212

13+
// Starting in Android N (API 24), SELinux policy prevents the shell user from
14+
// creating a hard link.
15+
// XFAIL: LIBCXX-ANDROID-FIXME && !android-device-api={{21|22|23}}
16+
1317
// <filesystem>
1418

1519
// uintmax_t hard_link_count(const path& p);

libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_empty/is_empty.pass.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
// UNSUPPORTED: no-filesystem
1111
// UNSUPPORTED: availability-filesystem-missing
1212

13+
// Starting in Android N (API 24), SELinux policy prevents the shell user from
14+
// creating a FIFO file.
15+
// XFAIL: LIBCXX-ANDROID-FIXME && !android-device-api={{21|22|23}}
16+
1317
// <filesystem>
1418

1519
// bool is_empty(path const& p);

libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.permissions/permissions.pass.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
// UNSUPPORTED: no-filesystem
1111
// UNSUPPORTED: availability-filesystem-missing
1212

13+
// Android's fchmodat seems broken on various OS versions -- see D140183. This
14+
// test probably passes on new-enough phones (not the emulator).
15+
// XFAIL: LIBCXX-ANDROID-FIXME && target={{i686|x86_64}}-{{.+}}-android{{.*}}
16+
// XFAIL: LIBCXX-ANDROID-FIXME && android-device-api={{21|22}}
17+
1318
// <filesystem>
1419

1520
// void permissions(const path& p, perms prms,

libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.status/status.pass.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
// UNSUPPORTED: no-filesystem
1111
// UNSUPPORTED: availability-filesystem-missing
1212

13+
// Starting in Android N (API 24), SELinux policy prevents the shell user from
14+
// creating a FIFO file.
15+
// XFAIL: LIBCXX-ANDROID-FIXME && !android-device-api={{21|22|23}}
16+
1317
// <filesystem>
1418

1519
// file_status status(const path& p);

libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.symlink_status/symlink_status.pass.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
// UNSUPPORTED: no-filesystem
1111
// UNSUPPORTED: availability-filesystem-missing
1212

13+
// Starting in Android N (API 24), SELinux policy prevents the shell user from
14+
// creating a FIFO file.
15+
// XFAIL: LIBCXX-ANDROID-FIXME && !android-device-api={{21|22|23}}
16+
1317
// <filesystem>
1418

1519
// file_status symlink_status(const path& p);

libcxx/test/std/input.output/iostream.format/ext.manip/get_money.pass.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010

1111
// template <class moneyT> T7 get_money(moneyT& mon, bool intl = false);
1212

13+
// Bionic has minimal locale support, investigate this later.
14+
// XFAIL: LIBCXX-ANDROID-FIXME
15+
1316
// REQUIRES: locale.en_US.UTF-8
1417

1518
#include <iomanip>

libcxx/test/std/input.output/iostream.format/ext.manip/put_money.pass.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010

1111
// template <class charT, class moneyT> T8 put_money(const moneyT& mon, bool intl = false);
1212

13+
// Bionic has minimal locale support, investigate this later.
14+
// XFAIL: LIBCXX-ANDROID-FIXME
15+
1316
// REQUIRES: locale.en_US.UTF-8
1417

1518
#include <iomanip>

libcxx/test/std/input.output/iostream.format/print.fun/no_file_description.pass.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
// XFAIL: msvc, target={{.+}}-windows-gnu
1313
// XFAIL: availability-fp_to_chars-missing
1414

15+
// fmemopen is available starting in Android M (API 23)
16+
// XFAIL: target={{.+}}-android{{(eabi)?(21|22)}}
17+
1518
// <print>
1619

1720
// The FILE returned by fmemopen does not have file descriptor.

libcxx/test/std/input.output/iostream.format/print.fun/print.file.pass.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111

1212
// XFAIL: availability-fp_to_chars-missing
1313

14+
// The error exception has no system error string.
15+
// XFAIL: LIBCXX-ANDROID-FIXME
16+
1417
// <print>
1518

1619
// template<class... Args>

libcxx/test/std/input.output/iostream.format/print.fun/println.file.pass.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111

1212
// XFAIL: availability-fp_to_chars-missing
1313

14+
// The error exception has no system error string.
15+
// XFAIL: LIBCXX-ANDROID-FIXME
16+
1417
// <print>
1518

1619
// template<class... Args>

libcxx/test/std/input.output/iostream.format/print.fun/vprint_nonunicode.file.pass.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616

1717
// XFAIL: availability-fp_to_chars-missing
1818

19+
// The error exception has no system error string.
20+
// XFAIL: LIBCXX-ANDROID-FIXME
21+
1922
// <print>
2023

2124
// void vprint_nonunicode(FILE* stream, string_view fmt, format_args args);

libcxx/test/std/input.output/iostream.format/print.fun/vprint_unicode.file.pass.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717

1818
// XFAIL: availability-fp_to_chars-missing
1919

20+
// The error exception has no system error string.
21+
// XFAIL: LIBCXX-ANDROID-FIXME
22+
2023
// <print>
2124

2225
// void vprint_unicode(FILE* stream, string_view fmt, format_args args);

libcxx/test/std/input.output/iostream.objects/narrow.stream.objects/cin.sh.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
// TODO: Investigate
1010
// UNSUPPORTED: LIBCXX-AIX-FIXME
1111

12+
// This test hangs on Android devices that lack shell_v2, which was added in
13+
// Android N (API 24).
14+
// UNSUPPORTED: LIBCXX-ANDROID-FIXME && android-device-api={{2[1-3]}}
15+
1216
// <iostream>
1317

1418
// istream cin;

libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wcin-imbue.sh.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
// TODO: Investigate
1010
// UNSUPPORTED: LIBCXX-AIX-FIXME
1111

12+
// This test hangs on Android devices that lack shell_v2, which was added in
13+
// Android N (API 24).
14+
// UNSUPPORTED: LIBCXX-ANDROID-FIXME && android-device-api={{2[1-3]}}
15+
1216
// <iostream>
1317

1418
// wistream wcin;

libcxx/test/std/input.output/iostream.objects/wide.stream.objects/wcin.sh.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
// TODO: Investigate
1010
// UNSUPPORTED: LIBCXX-AIX-FIXME
1111

12+
// This test hangs on Android devices that lack shell_v2, which was added in
13+
// Android N (API 24).
14+
// UNSUPPORTED: LIBCXX-ANDROID-FIXME && android-device-api={{2[1-3]}}
15+
1216
// <iostream>
1317

1418
// wistream wcin;

libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/pbump2gig.pass.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@
2222
// UNSUPPORTED: no-exceptions
2323

2424
// Android devices frequently don't have enough memory to run this test. Rather
25-
// than throw std::bad_alloc, exhausting memory tends to trigger the OOM Killer
26-
// and/or crash the device (killing adb, rebooting it, etc).
27-
// UNSUPPORTED: android
25+
// than throw std::bad_alloc, exhausting memory triggers the OOM Killer.
26+
// UNSUPPORTED: LIBCXX-ANDROID-FIXME
2827

2928
#include <sstream>
3029
#include <cassert>

libcxx/test/std/input.output/string.streams/stringstream/stringstream.members/gcount.pass.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
// UNSUPPORTED: 32-bit-pointer
1010
// REQUIRES: large_tests
1111

12+
// Android devices frequently don't have enough memory to run this test. Rather
13+
// than throw std::bad_alloc, exhausting memory triggers the OOM Killer.
14+
// UNSUPPORTED: LIBCXX-ANDROID-FIXME
15+
1216
// Test that tellp() does not break the stringstream after INT_MAX, due to use
1317
// of pbump() that accept int.
1418

0 commit comments

Comments
 (0)