diff options
author | Alessandro Fanfarillo <fanfarillo.gcc@gmail.com> | 2016-03-28 03:05:01 -0600 |
---|---|---|
committer | Alessandro Fanfarillo <afanfa@gcc.gnu.org> | 2016-03-28 03:05:01 -0600 |
commit | 0daa7ed9447c71f2a1c1311729f840c36d0a558d (patch) | |
tree | 5e06caaa5702f05c412828249ea7d92ef377f1a6 /libgfortran | |
parent | 45733562ce6c85f6bfd60afa5438f20ef47c2c15 (diff) | |
download | gcc-0daa7ed9447c71f2a1c1311729f840c36d0a558d.zip gcc-0daa7ed9447c71f2a1c1311729f840c36d0a558d.tar.gz gcc-0daa7ed9447c71f2a1c1311729f840c36d0a558d.tar.bz2 |
STOP managed by external library when coarrays are used
From-SVN: r234502
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 6 | ||||
-rw-r--r-- | libgfortran/caf/libcaf.h | 4 | ||||
-rw-r--r-- | libgfortran/caf/single.c | 17 |
3 files changed, 27 insertions, 0 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 4d10b27..6a742b5 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2016-03-28 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com> + + * caf/libcaf.h: caf_stop_numeric and caf_stop_str prototype. + * caf/single.c: _gfortran_caf_stop_numeric and + _gfortran_caf_stop_str implementation. + 2016-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/69456 diff --git a/libgfortran/caf/libcaf.h b/libgfortran/caf/libcaf.h index 427c8bf..01a33f9 100644 --- a/libgfortran/caf/libcaf.h +++ b/libgfortran/caf/libcaf.h @@ -105,6 +105,10 @@ void _gfortran_caf_sync_all (int *, char *, int); void _gfortran_caf_sync_memory (int *, char *, int); void _gfortran_caf_sync_images (int, int[], int *, char *, int); +void _gfortran_caf_stop_numeric (int32_t) + __attribute__ ((noreturn)); +void _gfortran_caf_stop_str (const char *, int32_t) + __attribute__ ((noreturn)); void _gfortran_caf_error_stop_str (const char *, int32_t) __attribute__ ((noreturn)); void _gfortran_caf_error_stop (int32_t) __attribute__ ((noreturn)); diff --git a/libgfortran/caf/single.c b/libgfortran/caf/single.c index 23278dc..f726537 100644 --- a/libgfortran/caf/single.c +++ b/libgfortran/caf/single.c @@ -204,6 +204,23 @@ _gfortran_caf_sync_images (int count __attribute__ ((unused)), *stat = 0; } +void +_gfortran_caf_stop_numeric(int32_t stop_code) +{ + fprintf (stderr, "STOP %d\n", stop_code); + exit (0); +} + +void +_gfortran_caf_stop_str(const char *string, int32_t len) +{ + fputs ("STOP ", stderr); + while (len--) + fputc (*(string++), stderr); + fputs ("\n", stderr); + + exit (0); +} void _gfortran_caf_error_stop_str (const char *string, int32_t len) |