Skip to content

Commit

Permalink
Fix Bugzilla 24598
Browse files Browse the repository at this point in the history
  • Loading branch information
ibara authored and dlang-bot committed Jun 11, 2024
1 parent 8d627e1 commit a3eb991
Show file tree
Hide file tree
Showing 34 changed files with 39 additions and 28 deletions.
4 changes: 4 additions & 0 deletions compiler/test/compilable/stdcheaders.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,23 @@ float x = NAN;

#ifndef _MSC_VER // C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\tgmath.h(33): Error: no type for declarator before `)`
#ifndef __APPLE__ // /Applications/Xcode-14.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/tgmath.h(39): Error: named parameter required before `...`
#ifndef __OpenBSD__ // /usr/lib/clang/13.0.0/include/tgmath.h(34): Error: named parameter required before `...`
#if !(defined(__linux__) && defined(__aarch64__)) // /tmp/clang/lib/clang/15.0.3/include/tgmath.h(34): Error: named parameter required before `...`
#include <tgmath.h>
#endif
#endif
#endif
#endif

#ifndef __linux__
#ifndef __APPLE__
#ifndef __OpenBSD__
#ifndef _MSC_VER
#include <threads.h>
#endif
#endif
#endif
#endif

#include <time.h>

Expand Down
2 changes: 1 addition & 1 deletion compiler/test/compilable/test21672.d
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// REQUIRED_ARGS: -mcpu=avx2 -O
// DISABLED: win32 linux32 freebsd32
// DISABLED: win32 linux32 freebsd32 openbsd32

// https://issues.dlang.org/show_bug.cgi?id=21672

Expand Down
2 changes: 1 addition & 1 deletion compiler/test/compilable/test22346.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* DISABLED: win32 win64 linux32 osx32 osx64 freebsd32
/* DISABLED: win32 win64 linux32 osx32 osx64 freebsd32 openbsd32
*/

// https://issues.dlang.org/show_bug.cgi?id=23346
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/fail_compilation/fail17105.d
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* REQUIRED_ARGS: -m64
DISABLED: win32 linux32 osx32 freebsd32
DISABLED: win32 linux32 osx32 freebsd32 openbsd32
TEST_OUTPUT:
---
fail_compilation/fail17105.d(20): Error: missing 4th parameter to `__simd()`
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/fail_compilation/fail18372.d
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
DISABLED: win32 win64 linux32 osx32 freebsd32
DISABLED: win32 win64 linux32 osx32 freebsd32 openbsd32
TEST_OUTPUT:
---
fail_compilation/fail18372.d(103): Error: `__va_list_tag` is not defined, perhaps `import core.stdc.stdarg;` ?
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/fail_compilation/fail6451.d
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
DISABLED: win32 win64 linux32 osx32 freebsd32
DISABLED: win32 win64 linux32 osx32 freebsd32 openbsd32
TEST_OUTPUT:
---
fail_compilation/fail6451.d(9): Error: `__va_list_tag` is not defined, perhaps `import core.stdc.stdarg;` ?
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/fail_compilation/ice20042.d
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
DISABLED: freebsd32 linux32 osx32 win32
DISABLED: freebsd32 openbsd32 linux32 osx32 win32
TEST_OUTPUT:
---
fail_compilation/ice20042.d(18): Error: slice operation `cast(__vector(float[4]))[nanF, nanF, nanF, nanF] = [1.0F, 2.0F, 3.0F, 4.0F][0..4]` cannot be evaluated at compile time
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/fail_compilation/ice20264.d
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
DISABLED: freebsd32 linux32 osx32 win32
DISABLED: freebsd32 openbsd32 linux32 osx32 win32
TEST_OUTPUT:
---
fail_compilation/ice20264.d(12): Error: cannot modify expression `cast(__vector(float[4]))a` because it is not an lvalue
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/fail_compilation/impconv.d
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FIXME: DMD host compilers < 2.073 with faulty optimization
lead to unfortunate test failures, see
https://github.com/dlang/dmd/pull/6831#issuecomment-304495842.
DISABLED: win32 win64 linux osx freebsd
DISABLED: win32 win64 linux osx freebsd openbsd
*/

/*
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/fail_compilation/vector_types.d
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
REQUIRED_ARGS: -o-
TEST_OUTPUT:
DISABLED: freebsd32 linux32 osx32 win32
DISABLED: freebsd32 openbsd32 linux32 osx32 win32
---
fail_compilation/vector_types.d(15): Error: 32 byte vector type `__vector(double[4])` is not supported on this platform
fail_compilation/vector_types.d(16): Error: 32 byte vector type `__vector(float[8])` is not supported on this platform
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/fail_compilation/xmmslice.d
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/* REQUIRED_ARGS: -mcpu=avx
DISABLED: win32 freebsd32 linux32 osx32
DISABLED: win32 freebsd32 openbsd32 linux32 osx32
TEST_OUTPUT:
---
fail_compilation/xmmslice.d(110): Error: `__vector(int[4])` cannot be sliced with `[]`
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/runnable/bitfieldsms.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* test bitfields for Microsoft C
* DISABLED: win32 linux32 freebsd32 osx32 linux64 freebsd64 osx64
* DISABLED: win32 linux freebsd openbsd osx
* RUN_OUTPUT:
---
DM | MS | P32 | P64
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/runnable/bitfieldsposix32.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* test bitfields
* DISABLED: win32 win64 linux64 freebsd64 osx64
* DISABLED: win32 win64 linux64 freebsd64 openbsd64 osx64
* RUN_OUTPUT:
---
T0 = 1 1 | 1 1
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/runnable/bitfieldsposix64.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* test bitfields
* DISABLED: win32 win64 linux32 freebsd32 osx32
* DISABLED: win32 win64 linux32 freebsd32 openbsd32 osx32
* RUN_OUTPUT:
---
T0 = 1 1 | 1 1
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/runnable/dbitfieldsms.d
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* test bitfields for Microsoft C
* REQUIRED_ARGS: -preview=bitfields
* DISABLED: win32 linux32 freebsd32 osx32 linux64 freebsd64 osx64
* DISABLED: win32 linux freebsd openbsd osx
* RUN_OUTPUT:
---
DM | MS | P32 | P64
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/runnable/dbitfieldsposix32.d
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* test bitfields
* REQUIRED_ARGS: -preview=bitfields
* DISABLED: win32 win64 linux64 freebsd64 osx64
* DISABLED: win32 win64 linux64 freebsd64 openbsd64 osx64
* RUN_OUTPUT:
---
T0 = 1 1 | 1 1
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/runnable/dbitfieldsposix64.d
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* test bitfields
* REQUIRED_ARGS: -preview=bitfields
* DISABLED: win32 win64 linux32 freebsd32 osx32
* DISABLED: win32 win64 linux32 freebsd32 openbsd32 osx32
* RUN_OUTPUT:
---
T0 = 1 1 | 1 1
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/runnable/dhry.d
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
PERMUTE_ARGS:
REQUIRED_ARGS: -release -O -g -inline
DISABLED: freebsd dragonflybsd
DISABLED: freebsd openbsd dragonflybsd
Deprecation caused by https://issues.dlang.org/show_bug.cgi?id=20645
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source tools/common_funcs.sh
# strip out Dmain since it's symbol differs between windows and non-windows
# strip out _d_arraycatnTX and _d_arraysetlengthT since they are part of the
# lowering of the array concatenation operator
grep -v 'Dmain\|_d_arraycatnTX\|_d_arraysetlengthT' ${OUTPUT_BASE}.d.trace.def > ${OUTPUT_BASE}.d.trace.def2
grep -Ev 'Dmain|_d_arraycatnTX|_d_arraysetlengthT' ${OUTPUT_BASE}.d.trace.def > ${OUTPUT_BASE}.d.trace.def2

diff -up --strip-trailing-cr ${EXTRA_FILES}/${TEST_NAME}.d.trace.def ${OUTPUT_BASE}.d.trace.def2

Expand Down
2 changes: 1 addition & 1 deletion compiler/test/runnable/ice21727.d
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// REQUIRED_ARGS: -m64 -O -inline
// DISABLED: win32 linux32 freebsd32 osx32 netbsd32 dragonflybsd32
// DISABLED: win32 linux32 freebsd32 osx32 openbsd32 netbsd32 dragonflybsd32
// https://issues.dlang.org/show_bug.cgi?id=21727

import core.simd;
Expand Down
1 change: 1 addition & 0 deletions compiler/test/runnable/test12.d
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// PERMUTE_ARGS: -unittest -O -release -inline -fPIC -g
// TRANSFORM_OUTPUT: remove_lines("warning: sprintf\(\) is often misused")

extern(C) int printf(const char*, ...);
extern(C) int sprintf(char*, const char*, ...);
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/runnable/test17559.d
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// REQUIRED_ARGS: -g
// REQUIRED_ARGS(linux freebsd dragonflybsd): -L-export-dynamic
// REQUIRED_ARGS(linux freebsd openbsd dragonflybsd): -L-export-dynamic
// PERMUTE_ARGS:
// DISABLED: osx

Expand Down
2 changes: 1 addition & 1 deletion compiler/test/runnable/test19086.d
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// REQUIRED_ARGS: -g
// REQUIRED_ARGS(linux freebsd dragonflybsd): -L-export-dynamic
// REQUIRED_ARGS(linux freebsd openbsd dragonflybsd): -L-export-dynamic
// PERMUTE_ARGS:
// DISABLED: osx

Expand Down
1 change: 1 addition & 0 deletions compiler/test/runnable/test22597.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// https://issues.dlang.org/show_bug.cgi?id=22597
// TRANSFORM_OUTPUT: remove_lines("warning: vsprintf\(\) is often misused")

typedef __builtin_va_list va_list;
int vsprintf(char *s, const char *format, va_list va);
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/runnable/test23343.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* DISABLED: win32 win64 linux32 linux64 freebsd32 freebsd64 osx32 dragonflybsd32 netbsd32
/* DISABLED: win linux freebsd openbsd osx32 dragonflybsd netbsd
*/

/* https://issues.dlang.org/show_bug.cgi?id=23343
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/runnable/test23889.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// DISABLED: win freebsd
// DISABLED: win freebsd openbsd

// https://issues.dlang.org/show_bug.cgi?id=23886

Expand Down
2 changes: 1 addition & 1 deletion compiler/test/runnable/test_cdstrpar.d
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// REQUIRED_ARGS: -O -fPIC
// PERMUTE_ARGS:
// only testing on SYSV-ABI, but backend code is identical across platforms
// DISABLED: win32 win64 osx linux32 freebsd32
// DISABLED: win32 win64 osx linux32 freebsd32 openbsd32
debug = PRINTF;
debug (PRINTF) import core.stdc.stdio;

Expand Down
2 changes: 1 addition & 1 deletion compiler/test/runnable/testargtypes.d
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
DISABLED: win32 win64 osx32 linux32 freebsd32
DISABLED: win32 win64 osx32 linux32 freebsd32 openbsd32
*/

void chkArgTypes(S, V...)()
Expand Down
1 change: 1 addition & 0 deletions compiler/test/runnable/testthread2.d
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// PERMUTE_ARGS:
// TRANSFORM_OUTPUT: remove_lines("warning: rand\(\) may return deterministic values")

// Quick, dirty and inefficient AA using linear search, useful for testing.
struct LinearAA(K, V) {
Expand Down
2 changes: 2 additions & 0 deletions compiler/test/runnable/variadic.d
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// TRANSFORM_OUTPUT: remove_lines("warning: vsprintf\(\) is often misused")

alias TypeTuple(T...) = T;

class A { }
Expand Down
1 change: 1 addition & 0 deletions compiler/test/runnable/whetstone.d
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
PERMUTE_ARGS: -O
TRANSFORM_OUTPUT: remove_lines("warning: sprintf\(\) is often misused")
*/

/*
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/runnable_cxx/cpp_abi_tests.d
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// EXTRA_CPP_SOURCES: cpp_abi_tests.cpp
// CXXFLAGS(linux freebsd osx netbsd dragonflybsd): -std=c++11
// CXXFLAGS(linux freebsd osx openbsd netbsd dragonflybsd): -std=c++11

// N.B MSVC doesn't have a C++11 switch, but it defaults to the latest fully-supported standard
// N.B MSVC 2013 doesn't support char16_t/char32_t
Expand Down
3 changes: 2 additions & 1 deletion compiler/test/runnable_cxx/cppa.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
// PERMUTE_ARGS: -g
// EXTRA_CPP_SOURCES: cppb.cpp
// EXTRA_FILES: extra-files/cppb.h
// CXXFLAGS(linux freebsd osx netbsd dragonflybsd): -std=c++11
// CXXFLAGS(linux freebsd osx openbsd netbsd dragonflybsd): -std=c++11
// druntime isn't linked, this prevents missing symbols '_d_arraybounds_slicep':
// REQUIRED_ARGS: -checkaction=C
// TRANSFORM_OUTPUT: remove_lines("warning: vsprintf\(\) is often misused")

// N.B MSVC doesn't have a C++11 switch, but it defaults to the latest fully-supported standard

Expand Down
2 changes: 1 addition & 1 deletion compiler/test/tools/d_do_test.d
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void usage()
~ " DMD: compiler to use, ex: ../src/dmd (required)\n"
~ " CC: C compiler to use, ex: cl, cc\n"
~ " CXX: C++ compiler to use, ex: cl, g++\n"
~ " OS: windows, linux, freebsd, osx, netbsd, dragonflybsd\n"
~ " OS: windows, linux, freebsd, osx, openbsd, netbsd, dragonflybsd\n"
~ " RESULTS_DIR: base directory for test results\n"
~ " MODEL: 32 or 64 (required)\n"
~ " AUTO_UPDATE: set to 1 to auto-update mismatching test output\n"
Expand Down

0 comments on commit a3eb991

Please sign in to comment.