From 424c6c88038ef13364e6e7e74e2389923d95396e Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Sun, 13 Apr 2025 00:48:45 +0200 Subject: d: Fix importC cannot find input file __importc_builtins.d [PR119761] Synchronizes the D runtime library with upstream druntime 09ed02ce56, and fixes a rename of the importC module missed in the r15-6559 merge. PR d/119761 libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime 09ed02ce56. * libdruntime/Makefile.am (DRUNTIME_DISOURCES): Rename __builtins.di to __importc_builtins.di. * libdruntime/Makefile.in: Regenerate. * libdruntime/__builtins.di: Move to... * libdruntime/__importc_builtins.di: ...here. gcc/testsuite/ChangeLog: * gdc.dg/import-c/import-c.exp: New test. * gdc.dg/import-c/pr119761.d: New test. * gdc.dg/import-c/pr119761c.c: New test. --- gcc/testsuite/gdc.dg/import-c/import-c.exp | 29 +++++++++++++++++++++++++++++ gcc/testsuite/gdc.dg/import-c/pr119761.d | 2 ++ gcc/testsuite/gdc.dg/import-c/pr119761c.c | 4 ++++ 3 files changed, 35 insertions(+) create mode 100644 gcc/testsuite/gdc.dg/import-c/import-c.exp create mode 100644 gcc/testsuite/gdc.dg/import-c/pr119761.d create mode 100644 gcc/testsuite/gdc.dg/import-c/pr119761c.c (limited to 'gcc') diff --git a/gcc/testsuite/gdc.dg/import-c/import-c.exp b/gcc/testsuite/gdc.dg/import-c/import-c.exp new file mode 100644 index 0000000..53d1478 --- /dev/null +++ b/gcc/testsuite/gdc.dg/import-c/import-c.exp @@ -0,0 +1,29 @@ +# Copyright (C) 2025 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GCC; see the file COPYING3. If not see +# . + +# Load support procs. +load_lib gdc-dg.exp + +# Initialize `dg'. +dg-init + +# Main loop. +gdc-dg-runtest [lsort \ + [glob -nocomplain $srcdir/$subdir/*.d ] ] "" \ + "-I $srcdir/$subdir -finclude-imports" + +# All done. +dg-finish diff --git a/gcc/testsuite/gdc.dg/import-c/pr119761.d b/gcc/testsuite/gdc.dg/import-c/pr119761.d new file mode 100644 index 0000000..20eff31 --- /dev/null +++ b/gcc/testsuite/gdc.dg/import-c/pr119761.d @@ -0,0 +1,2 @@ +// { dg-do compile } +import pr119761c; diff --git a/gcc/testsuite/gdc.dg/import-c/pr119761c.c b/gcc/testsuite/gdc.dg/import-c/pr119761c.c new file mode 100644 index 0000000..522f1bf --- /dev/null +++ b/gcc/testsuite/gdc.dg/import-c/pr119761c.c @@ -0,0 +1,4 @@ +int f119761(const char *, ...) +{ + return 0; +} -- cgit v1.1