Go to file
Thomas Koenig 2ea47ee9fd re PR fortran/82995 (Segmentation fault passing optional argument to intrinsic sum function)
2018-12-31  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/82995
	* trans-expr.c (gfc_conv_procedure_call):  Pass NULL pointer
	for missing optional dummy arguments for library routines.
	* trans-intinsic.c (conv_mask_condition): New function.
	(gfc_conv_intrinsic_arith): Detect and handle optional mask.
	(gfc_conv_intrinsic_minmaxloc): Likewise.
	(gfc_conv_intrinsic_findloc): Likewise.
	(gfc_conv_intrinsic_minmaxval): Likewise.
	(gfc_inline_intrinsic_function_p): Do not inline for rank > 1 if
	an optional mask is present.

2018-12-31  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/82995
        * m4/ifindloc0.m4: Handle case of absend optional argument, passed
	as a NULL pointer.  Correct allocation of retarray->base_addr.
        * m4/ifindloc1.m4: Likewise.
        * m4/ifindloc2.m4: Handle case of absend optional argument, passed
	as a NULL pointer.
        * m4/iforeach-s.m4: Likewise.
        * m4/iforeach-s2.m4: Likewise.
        * m4/iforeach.m4: Likewise.
        * m4/ifunction-s.m4: Likewise.
        * m4/ifunction-s2.m4: Likewise.
        * m4/ifunction.m4: Likewise.
        * generated/findloc0_c16.c: Regenerated.
        * generated/findloc0_c4.c: Regenerated.
        * generated/findloc0_c8.c: Regenerated.
        * generated/findloc0_i1.c: Regenerated.
        * generated/findloc0_i16.c: Regenerated.
        * generated/findloc0_i2.c: Regenerated.
        * generated/findloc0_i4.c: Regenerated.
        * generated/findloc0_i8.c: Regenerated.
        * generated/findloc0_r16.c: Regenerated.
        * generated/findloc0_r4.c: Regenerated.
        * generated/findloc0_r8.c: Regenerated.
        * generated/findloc0_s1.c: Regenerated.
        * generated/findloc0_s4.c: Regenerated.
        * generated/findloc1_c16.c: Regenerated.
        * generated/findloc1_c4.c: Regenerated.
        * generated/findloc1_c8.c: Regenerated.
        * generated/findloc1_i1.c: Regenerated.
        * generated/findloc1_i16.c: Regenerated.
        * generated/findloc1_i2.c: Regenerated.
        * generated/findloc1_i4.c: Regenerated.
        * generated/findloc1_i8.c: Regenerated.
        * generated/findloc1_r16.c: Regenerated.
        * generated/findloc1_r4.c: Regenerated.
        * generated/findloc1_r8.c: Regenerated.
        * generated/findloc1_s1.c: Regenerated.
        * generated/findloc1_s4.c: Regenerated.
        * generated/findloc2_s1.c: Regenerated.
        * generated/findloc2_s4.c: Regenerated.
        * generated/iall_i1.c: Regenerated.
        * generated/iall_i16.c: Regenerated.
        * generated/iall_i2.c: Regenerated.
        * generated/iall_i4.c: Regenerated.
        * generated/iall_i8.c: Regenerated.
        * generated/iany_i1.c: Regenerated.
        * generated/iany_i16.c: Regenerated.
        * generated/iany_i2.c: Regenerated.
        * generated/iany_i4.c: Regenerated.
        * generated/iany_i8.c: Regenerated.
        * generated/iparity_i1.c: Regenerated.
        * generated/iparity_i16.c: Regenerated.
        * generated/iparity_i2.c: Regenerated.
        * generated/iparity_i4.c: Regenerated.
        * generated/iparity_i8.c: Regenerated.
        * generated/maxloc0_16_i1.c: Regenerated.
        * generated/maxloc0_16_i16.c: Regenerated.
        * generated/maxloc0_16_i2.c: Regenerated.
        * generated/maxloc0_16_i4.c: Regenerated.
        * generated/maxloc0_16_i8.c: Regenerated.
        * generated/maxloc0_16_r10.c: Regenerated.
        * generated/maxloc0_16_r16.c: Regenerated.
        * generated/maxloc0_16_r4.c: Regenerated.
        * generated/maxloc0_16_r8.c: Regenerated.
        * generated/maxloc0_16_s1.c: Regenerated.
        * generated/maxloc0_16_s4.c: Regenerated.
        * generated/maxloc0_4_i1.c: Regenerated.
        * generated/maxloc0_4_i16.c: Regenerated.
        * generated/maxloc0_4_i2.c: Regenerated.
        * generated/maxloc0_4_i4.c: Regenerated.
        * generated/maxloc0_4_i8.c: Regenerated.
        * generated/maxloc0_4_r10.c: Regenerated.
        * generated/maxloc0_4_r16.c: Regenerated.
        * generated/maxloc0_4_r4.c: Regenerated.
        * generated/maxloc0_4_r8.c: Regenerated.
        * generated/maxloc0_4_s1.c: Regenerated.
        * generated/maxloc0_4_s4.c: Regenerated.
        * generated/maxloc0_8_i1.c: Regenerated.
        * generated/maxloc0_8_i16.c: Regenerated.
        * generated/maxloc0_8_i2.c: Regenerated.
        * generated/maxloc0_8_i4.c: Regenerated.
        * generated/maxloc0_8_i8.c: Regenerated.
        * generated/maxloc0_8_r10.c: Regenerated.
        * generated/maxloc0_8_r16.c: Regenerated.
        * generated/maxloc0_8_r4.c: Regenerated.
        * generated/maxloc0_8_r8.c: Regenerated.
        * generated/maxloc0_8_s1.c: Regenerated.
        * generated/maxloc0_8_s4.c: Regenerated.
        * generated/maxloc1_16_i1.c: Regenerated.
        * generated/maxloc1_16_i16.c: Regenerated.
        * generated/maxloc1_16_i2.c: Regenerated.
        * generated/maxloc1_16_i4.c: Regenerated.
        * generated/maxloc1_16_i8.c: Regenerated.
        * generated/maxloc1_16_r10.c: Regenerated.
        * generated/maxloc1_16_r16.c: Regenerated.
        * generated/maxloc1_16_r4.c: Regenerated.
        * generated/maxloc1_16_r8.c: Regenerated.
        * generated/maxloc1_16_s1.c: Regenerated.
        * generated/maxloc1_16_s4.c: Regenerated.
        * generated/maxloc1_4_i1.c: Regenerated.
        * generated/maxloc1_4_i16.c: Regenerated.
        * generated/maxloc1_4_i2.c: Regenerated.
        * generated/maxloc1_4_i4.c: Regenerated.
        * generated/maxloc1_4_i8.c: Regenerated.
        * generated/maxloc1_4_r10.c: Regenerated.
        * generated/maxloc1_4_r16.c: Regenerated.
        * generated/maxloc1_4_r4.c: Regenerated.
        * generated/maxloc1_4_r8.c: Regenerated.
        * generated/maxloc1_4_s1.c: Regenerated.
        * generated/maxloc1_4_s4.c: Regenerated.
        * generated/maxloc1_8_i1.c: Regenerated.
        * generated/maxloc1_8_i16.c: Regenerated.
        * generated/maxloc1_8_i2.c: Regenerated.
        * generated/maxloc1_8_i4.c: Regenerated.
        * generated/maxloc1_8_i8.c: Regenerated.
        * generated/maxloc1_8_r10.c: Regenerated.
        * generated/maxloc1_8_r16.c: Regenerated.
        * generated/maxloc1_8_r4.c: Regenerated.
        * generated/maxloc1_8_r8.c: Regenerated.
        * generated/maxloc1_8_s1.c: Regenerated.
        * generated/maxloc1_8_s4.c: Regenerated.
        * generated/maxval0_s1.c: Regenerated.
        * generated/maxval0_s4.c: Regenerated.
        * generated/maxval1_s1.c: Regenerated.
        * generated/maxval1_s4.c: Regenerated.
        * generated/maxval_i1.c: Regenerated.
        * generated/maxval_i16.c: Regenerated.
        * generated/maxval_i2.c: Regenerated.
        * generated/maxval_i4.c: Regenerated.
        * generated/maxval_i8.c: Regenerated.
        * generated/maxval_r10.c: Regenerated.
        * generated/maxval_r16.c: Regenerated.
        * generated/maxval_r4.c: Regenerated.
        * generated/maxval_r8.c: Regenerated.
        * generated/minloc0_16_i1.c: Regenerated.
        * generated/minloc0_16_i16.c: Regenerated.
        * generated/minloc0_16_i2.c: Regenerated.
        * generated/minloc0_16_i4.c: Regenerated.
        * generated/minloc0_16_i8.c: Regenerated.
        * generated/minloc0_16_r10.c: Regenerated.
        * generated/minloc0_16_r16.c: Regenerated.
        * generated/minloc0_16_r4.c: Regenerated.
        * generated/minloc0_16_r8.c: Regenerated.
        * generated/minloc0_16_s1.c: Regenerated.
        * generated/minloc0_16_s4.c: Regenerated.
        * generated/minloc0_4_i1.c: Regenerated.
        * generated/minloc0_4_i16.c: Regenerated.
        * generated/minloc0_4_i2.c: Regenerated.
        * generated/minloc0_4_i4.c: Regenerated.
        * generated/minloc0_4_i8.c: Regenerated.
        * generated/minloc0_4_r10.c: Regenerated.
        * generated/minloc0_4_r16.c: Regenerated.
        * generated/minloc0_4_r4.c: Regenerated.
        * generated/minloc0_4_r8.c: Regenerated.
        * generated/minloc0_4_s1.c: Regenerated.
        * generated/minloc0_4_s4.c: Regenerated.
        * generated/minloc0_8_i1.c: Regenerated.
        * generated/minloc0_8_i16.c: Regenerated.
        * generated/minloc0_8_i2.c: Regenerated.
        * generated/minloc0_8_i4.c: Regenerated.
        * generated/minloc0_8_i8.c: Regenerated.
        * generated/minloc0_8_r10.c: Regenerated.
        * generated/minloc0_8_r16.c: Regenerated.
        * generated/minloc0_8_r4.c: Regenerated.
        * generated/minloc0_8_r8.c: Regenerated.
        * generated/minloc0_8_s1.c: Regenerated.
        * generated/minloc0_8_s4.c: Regenerated.
        * generated/minloc1_16_i1.c: Regenerated.
        * generated/minloc1_16_i16.c: Regenerated.
        * generated/minloc1_16_i2.c: Regenerated.
        * generated/minloc1_16_i4.c: Regenerated.
        * generated/minloc1_16_i8.c: Regenerated.
        * generated/minloc1_16_r10.c: Regenerated.
        * generated/minloc1_16_r16.c: Regenerated.
        * generated/minloc1_16_r4.c: Regenerated.
        * generated/minloc1_16_r8.c: Regenerated.
        * generated/minloc1_16_s1.c: Regenerated.
        * generated/minloc1_16_s4.c: Regenerated.
        * generated/minloc1_4_i1.c: Regenerated.
        * generated/minloc1_4_i16.c: Regenerated.
        * generated/minloc1_4_i2.c: Regenerated.
        * generated/minloc1_4_i4.c: Regenerated.
        * generated/minloc1_4_i8.c: Regenerated.
        * generated/minloc1_4_r10.c: Regenerated.
        * generated/minloc1_4_r16.c: Regenerated.
        * generated/minloc1_4_r4.c: Regenerated.
        * generated/minloc1_4_r8.c: Regenerated.
        * generated/minloc1_4_s1.c: Regenerated.
        * generated/minloc1_4_s4.c: Regenerated.
        * generated/minloc1_8_i1.c: Regenerated.
        * generated/minloc1_8_i16.c: Regenerated.
        * generated/minloc1_8_i2.c: Regenerated.
        * generated/minloc1_8_i4.c: Regenerated.
        * generated/minloc1_8_i8.c: Regenerated.
        * generated/minloc1_8_r10.c: Regenerated.
        * generated/minloc1_8_r16.c: Regenerated.
        * generated/minloc1_8_r4.c: Regenerated.
        * generated/minloc1_8_r8.c: Regenerated.
        * generated/minloc1_8_s1.c: Regenerated.
        * generated/minloc1_8_s4.c: Regenerated.
        * generated/minval0_s1.c: Regenerated.
        * generated/minval0_s4.c: Regenerated.
        * generated/minval1_s1.c: Regenerated.
        * generated/minval1_s4.c: Regenerated.
        * generated/minval_i1.c: Regenerated.
        * generated/minval_i16.c: Regenerated.
        * generated/minval_i2.c: Regenerated.
        * generated/minval_i4.c: Regenerated.
        * generated/minval_i8.c: Regenerated.
        * generated/minval_r10.c: Regenerated.
        * generated/minval_r16.c: Regenerated.
        * generated/minval_r4.c: Regenerated.
        * generated/minval_r8.c: Regenerated.
        * generated/product_c10.c: Regenerated.
        * generated/product_c16.c: Regenerated.
        * generated/product_c4.c: Regenerated.
        * generated/product_c8.c: Regenerated.
        * generated/product_i1.c: Regenerated.
        * generated/product_i16.c: Regenerated.
        * generated/product_i2.c: Regenerated.
        * generated/product_i4.c: Regenerated.
        * generated/product_i8.c: Regenerated.
        * generated/product_r10.c: Regenerated.
        * generated/product_r16.c: Regenerated.
        * generated/product_r4.c: Regenerated.
        * generated/product_r8.c: Regenerated.
        * generated/sum_c10.c: Regenerated.
        * generated/sum_c16.c: Regenerated.
        * generated/sum_c4.c: Regenerated.
        * generated/sum_c8.c: Regenerated.
        * generated/sum_i1.c: Regenerated.
        * generated/sum_i16.c: Regenerated.
        * generated/sum_i2.c: Regenerated.
        * generated/sum_i4.c: Regenerated.
        * generated/sum_i8.c: Regenerated.
        * generated/sum_r10.c: Regenerated.
        * generated/sum_r16.c: Regenerated.
        * generated/sum_r4.c: Regenerated.
        * generated/sum_r8.c: Regenerated.

2018-12-31  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/82995
	* gfortran.dg/optional_absent_4.f90: New test.
	* gfortran.dg/optional_absent_5.f90: New test.

From-SVN: r267487
2018-12-31 14:59:46 +00:00
config iconv.m4 (AM_ICONV_LINK): Don't overwrite CPPFLAGS. 2018-11-07 15:41:21 -07:00
contrib Delete powerpcspe 2018-12-10 20:40:27 +01:00
fixincludes Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
gcc re PR fortran/82995 (Segmentation fault passing optional argument to intrinsic sum function) 2018-12-31 14:59:46 +00:00
gnattools PR81878: fix --disable-bootstrap --enable-languages=ada 2018-11-20 00:07:47 +00:00
gotools Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
include For libgomp OpenACC entry points, redefine the "device" argument to "flags" 2018-12-28 12:34:14 +01:00
INSTALL
intl iconv.m4 (AM_ICONV_LINK): Don't overwrite CPPFLAGS. 2018-11-07 15:41:21 -07:00
libada re PR ada/88429 (libada build fails with --disable-shared) 2018-12-11 23:04:39 +00:00
libatomic Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
libbacktrace Makefile.am (xcoff_%.c): Use an actual newline instead of \n in sed pattern. 2018-12-29 23:22:50 +00:00
libcc1 Eliminate source_location in favor of location_t 2018-11-13 20:05:03 +00:00
libcpp PR preprocessor/83173: Enhance -fdump-internal-locations output 2018-11-27 16:04:31 +00:00
libdecnumber Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
libffi Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
libgcc C/C++: Add -Waddress-of-packed-member 2018-12-20 13:41:48 -08:00
libgfortran re PR fortran/82995 (Segmentation fault passing optional argument to intrinsic sum function) 2018-12-31 14:59:46 +00:00
libgo runtime: prevent deadlock when profiling signal arrives in stack scan 2018-12-29 00:07:06 +00:00
libgomp For libgomp OpenACC entry points, redefine the "device" argument to "flags" 2018-12-28 12:34:14 +01:00
libhsail-rt Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
libiberty Remove support for demangling GCC 2.x era mangling schemes. 2018-12-22 19:06:34 -05:00
libitm re PR c++/88482 (ICE when wrongly declaring __cxa_allocate_exception) 2018-12-16 00:51:31 +01:00
libobjc Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
liboffloadmic Repair liboffloadmic after "(Partial) OpenMP 5.0 support for GCC 9" 2018-12-14 21:41:46 +01:00
libphobos libphobos: Merge common version blocks for core.sys.posix.sys.msg. 2018-12-16 23:18:25 +00:00
libquadmath re PR c/88430 (-Wmissing-attributes warnings when including libquadmath headers) 2018-12-11 08:45:47 +01:00
libsanitizer Cherry pick libsanitizer patch (https://reviews.llvm.org/D54856). 2018-12-27 09:47:20 +00:00
libssp Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
libstdc++-v3 2018-12-23 François Dumont <fdumont@gcc.gnu.org> 2018-12-23 18:11:38 +00:00
libvtv Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
lto-plugin Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
maintainer-scripts Add new maintainer script for PRs that can be closed. 2018-11-22 14:05:54 +00:00
zlib Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
ChangeLog Update maintainer email address 2018-12-21 17:53:03 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure darwin - add configuration support for 'otool' 2018-12-05 21:57:00 +00:00
configure.ac darwin - add configuration support for 'otool' 2018-12-05 21:57:00 +00:00
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4 Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS Update maintainer email address 2018-12-21 17:53:03 +00:00
Makefile.def
Makefile.in darwin - add configuration support for 'otool' 2018-12-05 21:57:00 +00:00
Makefile.tpl darwin - add configuration support for 'otool' 2018-12-05 21:57:00 +00:00
missing
mkdep
mkinstalldirs
move-if-change
multilib.am Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
README
symlink-tree
test-driver Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.