This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/85166] [nvptx, libgfortran] Libgomp fortran tests using stop in offloaded fns fail to compile
- From: "vries at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 04 Apr 2018 08:26:17 +0000
- Subject: [Bug target/85166] [nvptx, libgfortran] Libgomp fortran tests using stop in offloaded fns fail to compile
- Auto-submitted: auto-generated
- References: <bug-85166-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85166
--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Thomas Koenig from comment #2)
> Does this fix the problem?
>
> Index: minimal.c
> ===================================================================
> --- minimal.c (Revision 259055)
> +++ minimal.c (Arbeitskopie)
> @@ -187,3 +187,17 @@ sys_abort (void)
>
> abort();
> }
> +
> +/* A numeric STOP statement. */
> +
> +extern _Noreturn void stop_numeric (int, bool);
> +export_proto(stop_numeric);
> +
> +void
> +stop_numeric (int code, bool quiet)
> +{
> + if (!quiet)
> + printf ("STOP %d\n", code);
> +
> + exit (code);
> +}
It does.
Build for x86_64 with nvtpx accelerator and tested libgomp.