]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/fortran/doc/gfortran/intrinsic-procedures/abort.rst
9ac38fade2db68f5f345b3a37e5f23daf45df799
[thirdparty/gcc.git] / gcc / fortran / doc / gfortran / intrinsic-procedures / abort.rst
1 ..
2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
5
6 .. _abort:
7
8 ABORT --- Abort the program
9 ***************************
10
11 .. index:: ABORT, program termination, with core dump, terminate program, with core dump, core, dump
12
13 .. function:: ABORT()
14
15 ``ABORT`` causes immediate termination of the program. On operating
16 systems that support a core dump, ``ABORT`` will produce a core dump.
17 It will also print a backtrace, unless ``-fno-backtrace`` is given.
18
19 :return:
20 Does not return.
21
22 Standard:
23 GNU extension
24
25 Class:
26 Subroutine
27
28 Syntax:
29 .. code-block:: fortran
30
31 CALL ABORT
32
33 Example:
34 .. code-block:: fortran
35
36 program test_abort
37 integer :: i = 1, j = 2
38 if (i /= j) call abort
39 end program test_abort
40
41 See also:
42 :ref:`EXIT`,
43 :ref:`KILL`,
44 :ref:`BACKTRACE`