aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRong Xu <xur@google.com>2014-08-07 00:50:42 (GMT)
committerRong Xu <xur@google.com>2014-08-07 00:50:42 (GMT)
commitf1c18afafc2b321465ae6b07ede127095942d7dc (patch)
tree812093eebfa8510367718c12c02f7da03c0e73bf
parent38a8aecfb882072900434499696b5c32a2274515 (diff)
downloadtoolchain_gcc-f1c18afafc2b321465ae6b07ede127095942d7dc.zip
toolchain_gcc-f1c18afafc2b321465ae6b07ede127095942d7dc.tar.gz
toolchain_gcc-f1c18afafc2b321465ae6b07ede127095942d7dc.tar.bz2
[gcc-4.9] Merge svn r213650 from google/gcc-4_9 branch
Merge svn r213650 from google/gcc-4_9 branch. Tested with arm,x86,mips,arm64,x86_64,mips64 build in liunux/windows. Change-Id: I0c07f67d516074172aa393003eee664d01f2e0f2
-rw-r--r--gcc-4.9/ChangeLog15
-rw-r--r--gcc-4.9/boehm-gc/ChangeLog4
-rw-r--r--gcc-4.9/config/ChangeLog9
-rwxr-xr-xgcc-4.9/configure3
-rw-r--r--gcc-4.9/configure.ac3
-rw-r--r--gcc-4.9/contrib/ChangeLog4
-rw-r--r--gcc-4.9/contrib/reghunt/ChangeLog4
-rw-r--r--gcc-4.9/contrib/regression/ChangeLog4
-rw-r--r--gcc-4.9/contrib/testsuite-management/aarch64-grtev4-linux-gnu.xfail3
-rw-r--r--gcc-4.9/contrib/testsuite-management/powerpc64le-grtev4-linux-gnu.xfail3
-rw-r--r--gcc-4.9/fixincludes/ChangeLog4
-rw-r--r--gcc-4.9/gcc/ChangeLog242
-rw-r--r--gcc-4.9/gcc/DATESTAMP2
-rw-r--r--gcc-4.9/gcc/ada/ChangeLog4
-rw-r--r--gcc-4.9/gcc/c-family/ChangeLog14
-rw-r--r--gcc-4.9/gcc/c-family/c-gimplify.c4
-rw-r--r--gcc-4.9/gcc/c/ChangeLog4
-rw-r--r--gcc-4.9/gcc/cgraph.c6
-rw-r--r--gcc-4.9/gcc/common.opt4
-rw-r--r--gcc-4.9/gcc/config.gcc11
-rw-r--r--gcc-4.9/gcc/config/aarch64/aarch64-linux.h2
-rw-r--r--gcc-4.9/gcc/config/aarch64/aarch64.c14
-rw-r--r--gcc-4.9/gcc/config/alpha/elf.h4
-rw-r--r--gcc-4.9/gcc/config/arm/t-rtems-eabi124
-rw-r--r--gcc-4.9/gcc/config/cris/constraints.md4
-rw-r--r--gcc-4.9/gcc/config/cris/cris-protos.h5
-rw-r--r--gcc-4.9/gcc/config/cris/cris.c120
-rw-r--r--gcc-4.9/gcc/config/cris/cris.h11
-rw-r--r--gcc-4.9/gcc/config/cris/cris.md60
-rw-r--r--gcc-4.9/gcc/config/cris/predicates.md14
-rw-r--r--gcc-4.9/gcc/config/i386/avx512fintrin.h32
-rw-r--r--gcc-4.9/gcc/config/i386/i386.c2
-rw-r--r--gcc-4.9/gcc/config/i386/ia32intrin.h14
-rw-r--r--gcc-4.9/gcc/config/i386/sse.md14
-rw-r--r--gcc-4.9/gcc/config/rs6000/freebsd64.h2
-rw-r--r--gcc-4.9/gcc/config/rs6000/linux64.h2
-rw-r--r--gcc-4.9/gcc/config/rs6000/rs6000-protos.h1
-rw-r--r--gcc-4.9/gcc/config/rs6000/rs6000.c111
-rw-r--r--gcc-4.9/gcc/config/rs6000/sysv4.h18
-rw-r--r--gcc-4.9/gcc/config/sh/predicates.md8
-rw-r--r--gcc-4.9/gcc/config/sh/sh.c26
-rw-r--r--gcc-4.9/gcc/config/sparc/sync.md10
-rw-r--r--gcc-4.9/gcc/coverage.c46
-rw-r--r--gcc-4.9/gcc/coverage.h2
-rw-r--r--gcc-4.9/gcc/cp/ChangeLog9
-rw-r--r--gcc-4.9/gcc/cp/call.c6
-rw-r--r--gcc-4.9/gcc/cp/except.c4
-rw-r--r--gcc-4.9/gcc/expr.c2
-rw-r--r--gcc-4.9/gcc/fortran/ChangeLog12
-rw-r--r--gcc-4.9/gcc/fortran/dependency.c31
-rw-r--r--gcc-4.9/gcc/gcc.c3
-rw-r--r--gcc-4.9/gcc/gcov-tool.c27
-rw-r--r--gcc-4.9/gcc/go/ChangeLog4
-rw-r--r--gcc-4.9/gcc/ipa-inline-transform.c10
-rw-r--r--gcc-4.9/gcc/java/ChangeLog4
-rw-r--r--gcc-4.9/gcc/l-ipo.c6
-rw-r--r--gcc-4.9/gcc/lto/ChangeLog4
-rw-r--r--gcc-4.9/gcc/objc/ChangeLog4
-rw-r--r--gcc-4.9/gcc/objcp/ChangeLog4
-rw-r--r--gcc-4.9/gcc/omp-low.c1
-rw-r--r--gcc-4.9/gcc/opts.c105
-rw-r--r--gcc-4.9/gcc/opts.h2
-rw-r--r--gcc-4.9/gcc/params.c15
-rw-r--r--gcc-4.9/gcc/params.def11
-rw-r--r--gcc-4.9/gcc/params.h2
-rw-r--r--gcc-4.9/gcc/po/ChangeLog4
-rw-r--r--gcc-4.9/gcc/sched-deps.c3
-rw-r--r--gcc-4.9/gcc/testsuite/ChangeLog112
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/compat/struct-layout-1.exp3
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61160-1.C3
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61160-2.C3
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/tree-ssa/dom-invalid.C5
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20050316-1.x1
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20050604-1.x1
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/pr26570.c3
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/pr32773.c3
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/stack-usage-2.c17
-rw-r--r--gcc-4.9/gcc/toplev.c13
-rw-r--r--gcc-4.9/gcc/tree-profile.c13
-rw-r--r--gcc-4.9/gcc/tree-ssa-copy.c46
-rw-r--r--gcc-4.9/gcc/value-prof.c15
-rw-r--r--gcc-4.9/gnattools/ChangeLog4
-rw-r--r--gcc-4.9/include/ChangeLog4
-rw-r--r--gcc-4.9/intl/ChangeLog4
-rw-r--r--gcc-4.9/libada/ChangeLog4
-rw-r--r--gcc-4.9/libatomic/ChangeLog4
-rw-r--r--gcc-4.9/libbacktrace/ChangeLog4
-rw-r--r--gcc-4.9/libcilkrts/ChangeLog4
-rw-r--r--gcc-4.9/libcpp/ChangeLog4
-rw-r--r--gcc-4.9/libcpp/po/ChangeLog4
-rw-r--r--gcc-4.9/libdecnumber/ChangeLog4
-rw-r--r--gcc-4.9/libffi/ChangeLog4
-rw-r--r--gcc-4.9/libgcc/ChangeLog4
-rw-r--r--gcc-4.9/libgcc/config/libbid/ChangeLog4
-rw-r--r--gcc-4.9/libgcc/dyn-ipa.c803
-rw-r--r--gcc-4.9/libgcc/libgcov-driver.c151
-rw-r--r--gcc-4.9/libgcc/libgcov-interface.c94
-rw-r--r--gcc-4.9/libgcc/libgcov-util.c10
-rw-r--r--gcc-4.9/libgcc/libgcov.h11
-rw-r--r--gcc-4.9/libgfortran/ChangeLog58
-rw-r--r--gcc-4.9/libgfortran/generated/all_l1.c5
-rw-r--r--gcc-4.9/libgfortran/generated/all_l16.c5
-rw-r--r--gcc-4.9/libgfortran/generated/all_l2.c5
-rw-r--r--gcc-4.9/libgfortran/generated/all_l4.c5
-rw-r--r--gcc-4.9/libgfortran/generated/all_l8.c5
-rw-r--r--gcc-4.9/libgfortran/generated/any_l1.c5
-rw-r--r--gcc-4.9/libgfortran/generated/any_l16.c5
-rw-r--r--gcc-4.9/libgfortran/generated/any_l2.c5
-rw-r--r--gcc-4.9/libgfortran/generated/any_l4.c5
-rw-r--r--gcc-4.9/libgfortran/generated/any_l8.c5
-rw-r--r--gcc-4.9/libgfortran/generated/bessel_r10.c4
-rw-r--r--gcc-4.9/libgfortran/generated/bessel_r16.c4
-rw-r--r--gcc-4.9/libgfortran/generated/bessel_r4.c4
-rw-r--r--gcc-4.9/libgfortran/generated/bessel_r8.c4
-rw-r--r--gcc-4.9/libgfortran/generated/count_16_l.c5
-rw-r--r--gcc-4.9/libgfortran/generated/count_1_l.c5
-rw-r--r--gcc-4.9/libgfortran/generated/count_2_l.c5
-rw-r--r--gcc-4.9/libgfortran/generated/count_4_l.c5
-rw-r--r--gcc-4.9/libgfortran/generated/count_8_l.c5
-rw-r--r--gcc-4.9/libgfortran/generated/cshift1_16.c2
-rw-r--r--gcc-4.9/libgfortran/generated/cshift1_4.c2
-rw-r--r--gcc-4.9/libgfortran/generated/cshift1_8.c2
-rw-r--r--gcc-4.9/libgfortran/generated/eoshift1_16.c4
-rw-r--r--gcc-4.9/libgfortran/generated/eoshift1_4.c4
-rw-r--r--gcc-4.9/libgfortran/generated/eoshift1_8.c4
-rw-r--r--gcc-4.9/libgfortran/generated/eoshift3_16.c6
-rw-r--r--gcc-4.9/libgfortran/generated/eoshift3_4.c6
-rw-r--r--gcc-4.9/libgfortran/generated/eoshift3_8.c6
-rw-r--r--gcc-4.9/libgfortran/generated/iall_i1.c15
-rw-r--r--gcc-4.9/libgfortran/generated/iall_i16.c15
-rw-r--r--gcc-4.9/libgfortran/generated/iall_i2.c15
-rw-r--r--gcc-4.9/libgfortran/generated/iall_i4.c15
-rw-r--r--gcc-4.9/libgfortran/generated/iall_i8.c15
-rw-r--r--gcc-4.9/libgfortran/generated/iany_i1.c15
-rw-r--r--gcc-4.9/libgfortran/generated/iany_i16.c15
-rw-r--r--gcc-4.9/libgfortran/generated/iany_i2.c15
-rw-r--r--gcc-4.9/libgfortran/generated/iany_i4.c15
-rw-r--r--gcc-4.9/libgfortran/generated/iany_i8.c15
-rw-r--r--gcc-4.9/libgfortran/generated/in_pack_c10.c2
-rw-r--r--gcc-4.9/libgfortran/generated/in_pack_c16.c2
-rw-r--r--gcc-4.9/libgfortran/generated/in_pack_c4.c2
-rw-r--r--gcc-4.9/libgfortran/generated/in_pack_c8.c2
-rw-r--r--gcc-4.9/libgfortran/generated/in_pack_i1.c2
-rw-r--r--gcc-4.9/libgfortran/generated/in_pack_i16.c2
-rw-r--r--gcc-4.9/libgfortran/generated/in_pack_i2.c2
-rw-r--r--gcc-4.9/libgfortran/generated/in_pack_i4.c2
-rw-r--r--gcc-4.9/libgfortran/generated/in_pack_i8.c2
-rw-r--r--gcc-4.9/libgfortran/generated/in_pack_r10.c2
-rw-r--r--gcc-4.9/libgfortran/generated/in_pack_r16.c2
-rw-r--r--gcc-4.9/libgfortran/generated/in_pack_r4.c2
-rw-r--r--gcc-4.9/libgfortran/generated/in_pack_r8.c2
-rw-r--r--gcc-4.9/libgfortran/generated/iparity_i1.c15
-rw-r--r--gcc-4.9/libgfortran/generated/iparity_i16.c15
-rw-r--r--gcc-4.9/libgfortran/generated/iparity_i2.c15
-rw-r--r--gcc-4.9/libgfortran/generated/iparity_i4.c15
-rw-r--r--gcc-4.9/libgfortran/generated/iparity_i8.c15
-rw-r--r--gcc-4.9/libgfortran/generated/matmul_c10.c2
-rw-r--r--gcc-4.9/libgfortran/generated/matmul_c16.c2
-rw-r--r--gcc-4.9/libgfortran/generated/matmul_c4.c2
-rw-r--r--gcc-4.9/libgfortran/generated/matmul_c8.c2
-rw-r--r--gcc-4.9/libgfortran/generated/matmul_i1.c2
-rw-r--r--gcc-4.9/libgfortran/generated/matmul_i16.c2
-rw-r--r--gcc-4.9/libgfortran/generated/matmul_i2.c2
-rw-r--r--gcc-4.9/libgfortran/generated/matmul_i4.c2
-rw-r--r--gcc-4.9/libgfortran/generated/matmul_i8.c2
-rw-r--r--gcc-4.9/libgfortran/generated/matmul_l16.c2
-rw-r--r--gcc-4.9/libgfortran/generated/matmul_l4.c2
-rw-r--r--gcc-4.9/libgfortran/generated/matmul_l8.c2
-rw-r--r--gcc-4.9/libgfortran/generated/matmul_r10.c2
-rw-r--r--gcc-4.9/libgfortran/generated/matmul_r16.c2
-rw-r--r--gcc-4.9/libgfortran/generated/matmul_r4.c2
-rw-r--r--gcc-4.9/libgfortran/generated/matmul_r8.c2
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc0_16_i1.c6
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc0_16_i16.c6
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc0_16_i2.c6
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc0_16_i4.c6
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc0_16_i8.c6
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc0_16_r10.c6
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc0_16_r16.c6
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc0_16_r4.c6
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc0_16_r8.c6
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc0_4_i1.c6
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc0_4_i16.c6
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc0_4_i2.c6
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc0_4_i4.c6
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc0_4_i8.c6
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc0_4_r10.c6
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc0_4_r16.c6
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc0_4_r4.c6
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc0_4_r8.c6
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc0_8_i1.c6
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc0_8_i16.c6
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc0_8_i2.c6
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc0_8_i4.c6
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc0_8_i8.c6
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc0_8_r10.c6
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc0_8_r16.c6
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc0_8_r4.c6
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc0_8_r8.c6
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc1_16_i1.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc1_16_i16.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc1_16_i2.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc1_16_i4.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc1_16_i8.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc1_16_r10.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc1_16_r16.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc1_16_r4.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc1_16_r8.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc1_4_i1.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc1_4_i16.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc1_4_i2.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc1_4_i4.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc1_4_i8.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc1_4_r10.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc1_4_r16.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc1_4_r4.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc1_4_r8.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc1_8_i1.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc1_8_i16.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc1_8_i2.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc1_8_i4.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc1_8_i8.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc1_8_r10.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc1_8_r16.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc1_8_r4.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxloc1_8_r8.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxval_i1.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxval_i16.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxval_i2.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxval_i4.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxval_i8.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxval_r10.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxval_r16.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxval_r4.c15
-rw-r--r--gcc-4.9/libgfortran/generated/maxval_r8.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minloc0_16_i1.c6
-rw-r--r--gcc-4.9/libgfortran/generated/minloc0_16_i16.c6
-rw-r--r--gcc-4.9/libgfortran/generated/minloc0_16_i2.c6
-rw-r--r--gcc-4.9/libgfortran/generated/minloc0_16_i4.c6
-rw-r--r--gcc-4.9/libgfortran/generated/minloc0_16_i8.c6
-rw-r--r--gcc-4.9/libgfortran/generated/minloc0_16_r10.c6
-rw-r--r--gcc-4.9/libgfortran/generated/minloc0_16_r16.c6
-rw-r--r--gcc-4.9/libgfortran/generated/minloc0_16_r4.c6
-rw-r--r--gcc-4.9/libgfortran/generated/minloc0_16_r8.c6
-rw-r--r--gcc-4.9/libgfortran/generated/minloc0_4_i1.c6
-rw-r--r--gcc-4.9/libgfortran/generated/minloc0_4_i16.c6
-rw-r--r--gcc-4.9/libgfortran/generated/minloc0_4_i2.c6
-rw-r--r--gcc-4.9/libgfortran/generated/minloc0_4_i4.c6
-rw-r--r--gcc-4.9/libgfortran/generated/minloc0_4_i8.c6
-rw-r--r--gcc-4.9/libgfortran/generated/minloc0_4_r10.c6
-rw-r--r--gcc-4.9/libgfortran/generated/minloc0_4_r16.c6
-rw-r--r--gcc-4.9/libgfortran/generated/minloc0_4_r4.c6
-rw-r--r--gcc-4.9/libgfortran/generated/minloc0_4_r8.c6
-rw-r--r--gcc-4.9/libgfortran/generated/minloc0_8_i1.c6
-rw-r--r--gcc-4.9/libgfortran/generated/minloc0_8_i16.c6
-rw-r--r--gcc-4.9/libgfortran/generated/minloc0_8_i2.c6
-rw-r--r--gcc-4.9/libgfortran/generated/minloc0_8_i4.c6
-rw-r--r--gcc-4.9/libgfortran/generated/minloc0_8_i8.c6
-rw-r--r--gcc-4.9/libgfortran/generated/minloc0_8_r10.c6
-rw-r--r--gcc-4.9/libgfortran/generated/minloc0_8_r16.c6
-rw-r--r--gcc-4.9/libgfortran/generated/minloc0_8_r4.c6
-rw-r--r--gcc-4.9/libgfortran/generated/minloc0_8_r8.c6
-rw-r--r--gcc-4.9/libgfortran/generated/minloc1_16_i1.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minloc1_16_i16.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minloc1_16_i2.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minloc1_16_i4.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minloc1_16_i8.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minloc1_16_r10.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minloc1_16_r16.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minloc1_16_r4.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minloc1_16_r8.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minloc1_4_i1.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minloc1_4_i16.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minloc1_4_i2.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minloc1_4_i4.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minloc1_4_i8.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minloc1_4_r10.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minloc1_4_r16.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minloc1_4_r4.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minloc1_4_r8.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minloc1_8_i1.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minloc1_8_i16.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minloc1_8_i2.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minloc1_8_i4.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minloc1_8_i8.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minloc1_8_r10.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minloc1_8_r16.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minloc1_8_r4.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minloc1_8_r8.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minval_i1.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minval_i16.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minval_i2.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minval_i4.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minval_i8.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minval_r10.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minval_r16.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minval_r4.c15
-rw-r--r--gcc-4.9/libgfortran/generated/minval_r8.c15
-rw-r--r--gcc-4.9/libgfortran/generated/norm2_r10.c5
-rw-r--r--gcc-4.9/libgfortran/generated/norm2_r16.c5
-rw-r--r--gcc-4.9/libgfortran/generated/norm2_r4.c5
-rw-r--r--gcc-4.9/libgfortran/generated/norm2_r8.c5
-rw-r--r--gcc-4.9/libgfortran/generated/pack_c10.c4
-rw-r--r--gcc-4.9/libgfortran/generated/pack_c16.c4
-rw-r--r--gcc-4.9/libgfortran/generated/pack_c4.c4
-rw-r--r--gcc-4.9/libgfortran/generated/pack_c8.c4
-rw-r--r--gcc-4.9/libgfortran/generated/pack_i1.c4
-rw-r--r--gcc-4.9/libgfortran/generated/pack_i16.c4
-rw-r--r--gcc-4.9/libgfortran/generated/pack_i2.c4
-rw-r--r--gcc-4.9/libgfortran/generated/pack_i4.c4
-rw-r--r--gcc-4.9/libgfortran/generated/pack_i8.c4
-rw-r--r--gcc-4.9/libgfortran/generated/pack_r10.c4
-rw-r--r--gcc-4.9/libgfortran/generated/pack_r16.c4
-rw-r--r--gcc-4.9/libgfortran/generated/pack_r4.c4
-rw-r--r--gcc-4.9/libgfortran/generated/pack_r8.c4
-rw-r--r--gcc-4.9/libgfortran/generated/parity_l1.c5
-rw-r--r--gcc-4.9/libgfortran/generated/parity_l16.c5
-rw-r--r--gcc-4.9/libgfortran/generated/parity_l2.c5
-rw-r--r--gcc-4.9/libgfortran/generated/parity_l4.c5
-rw-r--r--gcc-4.9/libgfortran/generated/parity_l8.c5
-rw-r--r--gcc-4.9/libgfortran/generated/product_c10.c15
-rw-r--r--gcc-4.9/libgfortran/generated/product_c16.c15
-rw-r--r--gcc-4.9/libgfortran/generated/product_c4.c15
-rw-r--r--gcc-4.9/libgfortran/generated/product_c8.c15
-rw-r--r--gcc-4.9/libgfortran/generated/product_i1.c15
-rw-r--r--gcc-4.9/libgfortran/generated/product_i16.c15
-rw-r--r--gcc-4.9/libgfortran/generated/product_i2.c15
-rw-r--r--gcc-4.9/libgfortran/generated/product_i4.c15
-rw-r--r--gcc-4.9/libgfortran/generated/product_i8.c15
-rw-r--r--gcc-4.9/libgfortran/generated/product_r10.c15
-rw-r--r--gcc-4.9/libgfortran/generated/product_r16.c15
-rw-r--r--gcc-4.9/libgfortran/generated/product_r4.c15
-rw-r--r--gcc-4.9/libgfortran/generated/product_r8.c15
-rw-r--r--gcc-4.9/libgfortran/generated/reshape_c10.c6
-rw-r--r--gcc-4.9/libgfortran/generated/reshape_c16.c6
-rw-r--r--gcc-4.9/libgfortran/generated/reshape_c4.c6
-rw-r--r--gcc-4.9/libgfortran/generated/reshape_c8.c6
-rw-r--r--gcc-4.9/libgfortran/generated/reshape_i16.c6
-rw-r--r--gcc-4.9/libgfortran/generated/reshape_i4.c6
-rw-r--r--gcc-4.9/libgfortran/generated/reshape_i8.c6
-rw-r--r--gcc-4.9/libgfortran/generated/reshape_r10.c6
-rw-r--r--gcc-4.9/libgfortran/generated/reshape_r16.c6
-rw-r--r--gcc-4.9/libgfortran/generated/reshape_r4.c6
-rw-r--r--gcc-4.9/libgfortran/generated/reshape_r8.c6
-rw-r--r--gcc-4.9/libgfortran/generated/shape_i16.c2
-rw-r--r--gcc-4.9/libgfortran/generated/shape_i4.c2
-rw-r--r--gcc-4.9/libgfortran/generated/shape_i8.c2
-rw-r--r--gcc-4.9/libgfortran/generated/spread_c10.c6
-rw-r--r--gcc-4.9/libgfortran/generated/spread_c16.c6
-rw-r--r--gcc-4.9/libgfortran/generated/spread_c4.c6
-rw-r--r--gcc-4.9/libgfortran/generated/spread_c8.c6
-rw-r--r--gcc-4.9/libgfortran/generated/spread_i1.c6
-rw-r--r--gcc-4.9/libgfortran/generated/spread_i16.c6
-rw-r--r--gcc-4.9/libgfortran/generated/spread_i2.c6
-rw-r--r--gcc-4.9/libgfortran/generated/spread_i4.c6
-rw-r--r--gcc-4.9/libgfortran/generated/spread_i8.c6
-rw-r--r--gcc-4.9/libgfortran/generated/spread_r10.c6
-rw-r--r--gcc-4.9/libgfortran/generated/spread_r16.c6
-rw-r--r--gcc-4.9/libgfortran/generated/spread_r4.c6
-rw-r--r--gcc-4.9/libgfortran/generated/spread_r8.c6
-rw-r--r--gcc-4.9/libgfortran/generated/sum_c10.c15
-rw-r--r--gcc-4.9/libgfortran/generated/sum_c16.c15
-rw-r--r--gcc-4.9/libgfortran/generated/sum_c4.c15
-rw-r--r--gcc-4.9/libgfortran/generated/sum_c8.c15
-rw-r--r--gcc-4.9/libgfortran/generated/sum_i1.c15
-rw-r--r--gcc-4.9/libgfortran/generated/sum_i16.c15
-rw-r--r--gcc-4.9/libgfortran/generated/sum_i2.c15
-rw-r--r--gcc-4.9/libgfortran/generated/sum_i4.c15
-rw-r--r--gcc-4.9/libgfortran/generated/sum_i8.c15
-rw-r--r--gcc-4.9/libgfortran/generated/sum_r10.c15
-rw-r--r--gcc-4.9/libgfortran/generated/sum_r16.c15
-rw-r--r--gcc-4.9/libgfortran/generated/sum_r4.c15
-rw-r--r--gcc-4.9/libgfortran/generated/sum_r8.c15
-rw-r--r--gcc-4.9/libgfortran/generated/transpose_c10.c3
-rw-r--r--gcc-4.9/libgfortran/generated/transpose_c16.c3
-rw-r--r--gcc-4.9/libgfortran/generated/transpose_c4.c3
-rw-r--r--gcc-4.9/libgfortran/generated/transpose_c8.c3
-rw-r--r--gcc-4.9/libgfortran/generated/transpose_i16.c3
-rw-r--r--gcc-4.9/libgfortran/generated/transpose_i4.c3
-rw-r--r--gcc-4.9/libgfortran/generated/transpose_i8.c3
-rw-r--r--gcc-4.9/libgfortran/generated/transpose_r10.c3
-rw-r--r--gcc-4.9/libgfortran/generated/transpose_r16.c3
-rw-r--r--gcc-4.9/libgfortran/generated/transpose_r4.c3
-rw-r--r--gcc-4.9/libgfortran/generated/transpose_r8.c3
-rw-r--r--gcc-4.9/libgfortran/generated/unpack_c10.c4
-rw-r--r--gcc-4.9/libgfortran/generated/unpack_c16.c4
-rw-r--r--gcc-4.9/libgfortran/generated/unpack_c4.c4
-rw-r--r--gcc-4.9/libgfortran/generated/unpack_c8.c4
-rw-r--r--gcc-4.9/libgfortran/generated/unpack_i1.c4
-rw-r--r--gcc-4.9/libgfortran/generated/unpack_i16.c4
-rw-r--r--gcc-4.9/libgfortran/generated/unpack_i2.c4
-rw-r--r--gcc-4.9/libgfortran/generated/unpack_i4.c4
-rw-r--r--gcc-4.9/libgfortran/generated/unpack_i8.c4
-rw-r--r--gcc-4.9/libgfortran/generated/unpack_r10.c4
-rw-r--r--gcc-4.9/libgfortran/generated/unpack_r16.c4
-rw-r--r--gcc-4.9/libgfortran/generated/unpack_r4.c4
-rw-r--r--gcc-4.9/libgfortran/generated/unpack_r8.c4
-rw-r--r--gcc-4.9/libgfortran/intrinsics/cshift0.c4
-rw-r--r--gcc-4.9/libgfortran/intrinsics/eoshift0.c4
-rw-r--r--gcc-4.9/libgfortran/intrinsics/eoshift2.c4
-rw-r--r--gcc-4.9/libgfortran/intrinsics/pack_generic.c6
-rw-r--r--gcc-4.9/libgfortran/intrinsics/reshape_generic.c6
-rw-r--r--gcc-4.9/libgfortran/intrinsics/spread_generic.c4
-rw-r--r--gcc-4.9/libgfortran/intrinsics/string_intrinsics_inc.c4
-rw-r--r--gcc-4.9/libgfortran/intrinsics/transpose_generic.c2
-rw-r--r--gcc-4.9/libgfortran/intrinsics/unpack_generic.c2
-rw-r--r--gcc-4.9/libgfortran/io/list_read.c2
-rw-r--r--gcc-4.9/libgfortran/io/transfer.c4
-rw-r--r--gcc-4.9/libgfortran/io/unit.c2
-rw-r--r--gcc-4.9/libgfortran/io/write.c4
-rw-r--r--gcc-4.9/libgfortran/libgfortran.h3
-rw-r--r--gcc-4.9/libgfortran/m4/bessel.m44
-rw-r--r--gcc-4.9/libgfortran/m4/cshift1.m42
-rw-r--r--gcc-4.9/libgfortran/m4/eoshift1.m44
-rw-r--r--gcc-4.9/libgfortran/m4/eoshift3.m46
-rw-r--r--gcc-4.9/libgfortran/m4/iforeach.m46
-rw-r--r--gcc-4.9/libgfortran/m4/ifunction.m415
-rw-r--r--gcc-4.9/libgfortran/m4/ifunction_logical.m45
-rw-r--r--gcc-4.9/libgfortran/m4/in_pack.m42
-rw-r--r--gcc-4.9/libgfortran/m4/matmul.m42
-rw-r--r--gcc-4.9/libgfortran/m4/matmull.m42
-rw-r--r--gcc-4.9/libgfortran/m4/pack.m44
-rw-r--r--gcc-4.9/libgfortran/m4/reshape.m46
-rw-r--r--gcc-4.9/libgfortran/m4/shape.m42
-rw-r--r--gcc-4.9/libgfortran/m4/spread.m46
-rw-r--r--gcc-4.9/libgfortran/m4/transpose.m43
-rw-r--r--gcc-4.9/libgfortran/m4/unpack.m44
-rw-r--r--gcc-4.9/libgfortran/runtime/convert_char.c4
-rw-r--r--gcc-4.9/libgfortran/runtime/environ.c2
-rw-r--r--gcc-4.9/libgfortran/runtime/in_pack_generic.c2
-rw-r--r--gcc-4.9/libgfortran/runtime/memory.c29
-rw-r--r--gcc-4.9/libgomp/ChangeLog4
-rw-r--r--gcc-4.9/libiberty/ChangeLog4
-rw-r--r--gcc-4.9/libitm/ChangeLog10
-rw-r--r--gcc-4.9/libitm/configure.tgt1
-rw-r--r--gcc-4.9/libjava/ChangeLog4
-rw-r--r--gcc-4.9/libjava/classpath/ChangeLog4
-rw-r--r--gcc-4.9/libjava/libltdl/ChangeLog4
-rw-r--r--gcc-4.9/libobjc/ChangeLog17
-rw-r--r--gcc-4.9/libobjc/encoding.c2
-rw-r--r--gcc-4.9/libquadmath/ChangeLog4
-rw-r--r--gcc-4.9/libsanitizer/ChangeLog4
-rw-r--r--gcc-4.9/libssp/ChangeLog4
-rw-r--r--gcc-4.9/libstdc++-v3/ChangeLog15
-rw-r--r--gcc-4.9/libstdc++-v3/include/bits/random.h2
-rw-r--r--gcc-4.9/libstdc++-v3/include/bits/random.tcc3
-rw-r--r--gcc-4.9/libstdc++-v3/include/ext/random.tcc2
-rw-r--r--gcc-4.9/libvtv/ChangeLog4
-rw-r--r--gcc-4.9/lto-plugin/ChangeLog4
-rw-r--r--gcc-4.9/maintainer-scripts/ChangeLog4
-rw-r--r--gcc-4.9/zlib/ChangeLog4
451 files changed, 3651 insertions, 1829 deletions
diff --git a/gcc-4.9/ChangeLog b/gcc-4.9/ChangeLog
index 95931df..b526895 100644
--- a/gcc-4.9/ChangeLog
+++ b/gcc-4.9/ChangeLog
@@ -1,3 +1,13 @@
+2014-07-26 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/47230
+ * configure.ac (alpha*-*-linux*): Use mh-alpha-linux.
+ * configure: Regenerate.
+
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-04-22 Release Manager
* GCC 4.9.0 released.
@@ -5,7 +15,7 @@
2014-04-04 Eric Botcazou <ebotcazou@adacore.com>
PR bootstrap/60620
- * Makefile.def (dependencies): Make gnattools depend on libstdc++-v3.
+ * Makefile.def (dependencies): Make gnattools depend on libstdc++-v3.
* Makefile.in: Regenerate.
2014-03-28 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
@@ -43,7 +53,8 @@
2014-03-07 Denis Chertykov <chertykov@gmail.com>
- * MAINTAINERS: Remove avr maintainers: Anatoly Sokolov and Eric Weddington
+ * MAINTAINERS: Remove avr maintainers: Anatoly Sokolov
+ and Eric Weddington
2014-03-07 Jakub Jelinek <jakub@redhat.com>
diff --git a/gcc-4.9/boehm-gc/ChangeLog b/gcc-4.9/boehm-gc/ChangeLog
index b6ef629..2dbc61f 100644
--- a/gcc-4.9/boehm-gc/ChangeLog
+++ b/gcc-4.9/boehm-gc/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-04-22 Release Manager
* GCC 4.9.0 released.
diff --git a/gcc-4.9/config/ChangeLog b/gcc-4.9/config/ChangeLog
index a8877a1..cb6dcaa 100644
--- a/gcc-4.9/config/ChangeLog
+++ b/gcc-4.9/config/ChangeLog
@@ -1,3 +1,12 @@
+2014-07-26 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/47230
+ * mh-alpha-linux: New file.
+
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-04-22 Release Manager
* GCC 4.9.0 released.
diff --git a/gcc-4.9/configure b/gcc-4.9/configure
index 795bc79..a913942 100755
--- a/gcc-4.9/configure
+++ b/gcc-4.9/configure
@@ -3871,6 +3871,9 @@ fi
*-mingw*)
host_makefile_frag="config/mh-mingw"
;;
+ alpha*-*-linux*)
+ host_makefile_frag="config/mh-alpha-linux"
+ ;;
hppa*-hp-hpux10*)
host_makefile_frag="config/mh-pa-hpux10"
;;
diff --git a/gcc-4.9/configure.ac b/gcc-4.9/configure.ac
index fce98f1..aa41d3c 100644
--- a/gcc-4.9/configure.ac
+++ b/gcc-4.9/configure.ac
@@ -1180,6 +1180,9 @@ case "${host}" in
*-mingw*)
host_makefile_frag="config/mh-mingw"
;;
+ alpha*-*-linux*)
+ host_makefile_frag="config/mh-alpha-linux"
+ ;;
hppa*-hp-hpux10*)
host_makefile_frag="config/mh-pa-hpux10"
;;
diff --git a/gcc-4.9/contrib/ChangeLog b/gcc-4.9/contrib/ChangeLog
index a3fad38..9853898 100644
--- a/gcc-4.9/contrib/ChangeLog
+++ b/gcc-4.9/contrib/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-06-29 Richard Biener <rguenther@suse.de>
* gennews: Use gcc-3.0/index.html.
diff --git a/gcc-4.9/contrib/reghunt/ChangeLog b/gcc-4.9/contrib/reghunt/ChangeLog
index 8e36f54..ccb88eb 100644
--- a/gcc-4.9/contrib/reghunt/ChangeLog
+++ b/gcc-4.9/contrib/reghunt/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-04-22 Release Manager
* GCC 4.9.0 released.
diff --git a/gcc-4.9/contrib/regression/ChangeLog b/gcc-4.9/contrib/regression/ChangeLog
index 1528193..de91385 100644
--- a/gcc-4.9/contrib/regression/ChangeLog
+++ b/gcc-4.9/contrib/regression/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-04-22 Release Manager
* GCC 4.9.0 released.
diff --git a/gcc-4.9/contrib/testsuite-management/aarch64-grtev4-linux-gnu.xfail b/gcc-4.9/contrib/testsuite-management/aarch64-grtev4-linux-gnu.xfail
index 48d392d..d77ebee 100644
--- a/gcc-4.9/contrib/testsuite-management/aarch64-grtev4-linux-gnu.xfail
+++ b/gcc-4.9/contrib/testsuite-management/aarch64-grtev4-linux-gnu.xfail
@@ -65,6 +65,9 @@ FAIL: gcc.target/aarch64/fcvt_float_long.c scan-assembler-times fcvtas\tx[0-9]+,
FAIL: gcc.target/aarch64/vect-abs-compile.c scan-assembler abs\\tv[0-9]+.16b
FAIL: gcc.target/aarch64/vect-abs-compile.c scan-assembler abs\\tv[0-9]+.8h
+# AArch64 and PowerPC64LE failure (new 2014-07-31)
+FAIL: gcc.dg/tree-prof/crossmodule-indircall-1.c execution, -fprofile-use -D_PROFILE_USE
+
# *** g++:
diff --git a/gcc-4.9/contrib/testsuite-management/powerpc64le-grtev4-linux-gnu.xfail b/gcc-4.9/contrib/testsuite-management/powerpc64le-grtev4-linux-gnu.xfail
index 0b0c4ce..d3717ac 100644
--- a/gcc-4.9/contrib/testsuite-management/powerpc64le-grtev4-linux-gnu.xfail
+++ b/gcc-4.9/contrib/testsuite-management/powerpc64le-grtev4-linux-gnu.xfail
@@ -134,6 +134,9 @@ flaky | FAIL: g++.dg/init/placement2.C -std=c++1y execution test
flaky | FAIL: g++.dg/init/ref9.C -std=c++98 execution test
flaky | FAIL: g++.dg/init/ref9.C -std=c++11 execution test
+# AArch64 and PowerPC64LE failure (new 2014-07-31)
+FAIL: gcc.dg/tree-prof/crossmodule-indircall-1.c execution, -fprofile-use -D_PROFILE_USE
+
# *** g++:
diff --git a/gcc-4.9/fixincludes/ChangeLog b/gcc-4.9/fixincludes/ChangeLog
index d4738d0..cef5385 100644
--- a/gcc-4.9/fixincludes/ChangeLog
+++ b/gcc-4.9/fixincludes/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-04-22 Release Manager
* GCC 4.9.0 released.
diff --git a/gcc-4.9/gcc/ChangeLog b/gcc-4.9/gcc/ChangeLog
index dd6e9ad..df98072 100644
--- a/gcc-4.9/gcc/ChangeLog
+++ b/gcc-4.9/gcc/ChangeLog
@@ -1,3 +1,198 @@
+2014-07-31 Oleg Endo <olegendo@gcc.gnu.org>
+
+ Backport from mainline
+ 2014-07-31 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/61844
+ * config/sh/sh.c (sh_legitimate_address_p,
+ sh_legitimize_reload_address): Handle reg+reg address modes when
+ ALLOW_INDEXED_ADDRESS is false.
+ * config/sh/predicates.md (general_movsrc_operand,
+ general_movdst_operand): Likewise.
+
+2014-07-25 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2014-07-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/61656
+ * config/i386/i386.c (classify_argument): Don't merge classes above
+ number of words.
+
+2014-07-25 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/alpha/elf.h: Define TARGET_UNWIND_TABLES_DEFAULT.
+
+2014-07-24 Kyle McMartin <kyle@redhat.com>
+
+ * config/aarch64/aarch64-linux.h (TARGET_ASM_FILE_END): Define.
+
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * config/rs6000/rs6000-protos.h (rs6000_special_adjust_field_align_p):
+ Add prototype.
+ * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p): New
+ function. Issue -Wpsabi warning if future GCC releases will use
+ different field alignment rules for this type.
+ * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Call it.
+ * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise.
+ * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise.
+
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * config/rs6000/rs6000.c (rs6000_function_arg_boundary): Issue
+ -Wpsabi note when encountering a type where future GCC releases
+ will apply different alignment requirements.
+
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * config/rs6000/rs6000.c (rs6000_function_arg): If a float argument
+ does not fit fully into floating-point registers, and there is still
+ space in the register parameter area, issue -Wpsabi note that the ABI
+ will change in a future GCC release.
+
+2014-07-23 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * config/arm/t-rtems-eabi: Add
+ mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard,
+ mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard,
+ mbig-endian/mthumb/march=armv7-r, and
+ mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
+ multilibs.
+
+2014-07-23 Sebastian Huber <sebastian.huber@embedded-brains.de>
+ Chris Johns <chrisj@rtems.org>
+ Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * config.gcc: Add nios2-*-rtems*.
+ * config/nios2/rtems.h: New file.
+ * gcc/config/nios2/t-rtems: New file.
+
+2014-07-21 Peter Bergner <bergner@vnet.ibm.com>
+
+ * config/rs6000/sysv4.h (LIBASAN_EARLY_SPEC): Define.
+ (LIBTSAN_EARLY_SPEC): Likewise.
+
+2014-07-21 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2014-07-21 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/61855
+ * config/i386/avx512fintrin.h: Move constants for mantissa extraction
+ out of #ifdef __OPTIMIZE__.
+
+2014-07-20 Eric Botcazou <ebotcazou@adacore.com>
+
+ * expr.c (store_field): Handle VOIDmode for calls that return values
+ in multiple locations.
+
+2014-07-19 Eric Botcazou <ebotcazou@adacore.com>
+
+ * toplev.c (output_stack_usage): Adjust the location of the warning.
+
+2014-07-19 Daniel Cederman <cederman@gaisler.com>
+
+ * config/sparc/sync.md (*membar_storeload_leon3): New insn.
+ (*membar_storeload): Disable for LEON3.
+
+2014-07-18 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2014-07-16 David Wohlferd <dw@LimeGreenSocks.com>
+
+ PR target/61662
+ * config/i386/ia32intrin.h: Use __LP64__ to determine size of long.
+
+2014-07-18 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2014-07-18 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/61794
+ * config/i386/sse.md (avx512f_vextract<shuffletype>32x4_1_maskm):
+ Fix instruction constraint.
+ (<mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name>): Ditto.
+
+2014-07-17 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2014-07-14 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/61779
+ * tree-ssa-copy.c (copy_prop_visit_cond_stmt): Always try
+ simplifying a condition.
+
+2014-07-17 Richard Biener <rguenther@suse.de>
+
+ PR rtl-optimization/61801
+ * sched-deps.c (sched_analyze_2): For ASM_OPERANDS and ASM_INPUT
+ don't set reg_pending_barrier if it appears in a debug-insn.
+
+2014-07-17 Hans-Peter Nilsson <hp@axis.com>
+
+ Backport from trunk.
+ PR target/61737.
+ * config/cris/cris.c (TARGET_LEGITIMATE_CONSTANT_P)
+ (TARGET_CANNOT_FORCE_CONST_MEM): Define.
+ (cris_cannot_force_const_mem, cris_legitimate_constant_p): New
+ functions.
+ (cris_print_index, cris_print_operand, cris_constant_index_p)
+ (cris_side_effect_mode_ok): Replace CONSTANT_P with CRIS_CONSTANT_P.
+ (cris_address_cost): Ditto last CONSTANT_P.
+ (cris_symbol_type_of): Rename from cris_pic_symbol_type_of. All
+ callers changed. Yield cris_offsettable_symbol for non-PIC
+ constant symbolic expressions including labels. Yield cris_unspec
+ for all unspecs.
+ (cris_expand_pic_call_address): New parameter MARKERP. Set its
+ target to pic_offset_table_rtx for calls that will likely go
+ through PLT, const0_rtx when they can't. All callers changed.
+ Assert flag_pic. Use CONSTANT_P, not CONSTANT_ADDRESS_P, for
+ symbolic expressions to be PICified. Remove second, redundant,
+ assert on can_create_pseudo_p returning non-zero. Use
+ replace_equiv_address_nv, not replace_equiv_address, for final
+ operand update.
+ * config/cris/cris.md ("movsi"): Move variable t to pattern
+ toplevel. Adjust assert for new cris_symbol_type member. Use
+ CONSTANT_P instead of CONSTANT_ADDRESS_P.
+ ("*movsi_internal") <case 9>: Make check for valid unspec operands
+ for lapc stricter.
+ <case CRIS_UNSPEC_PCREL, CRIS_UNSPEC_PLT_PCREL>: Clear condition codes.
+ ("call", "call_value"): Use second incoming operand as a marker
+ for pic-offset-table-register being used.
+ ("*expanded_call_non_v32", "*expanded_call_v32")
+ ("*expanded_call_value_non_v32", "*expanded_call_value_v32"): For
+ second incoming operand to CALL, match cris_call_type_marker.
+ ("*expanded_call_value_side"): Ditto. Disable before reload_completed.
+ ("*expanded_call_side"): Ditto. Fix typo in comment.
+ (moverside, movemside peepholes): Check for CRIS_CONSTANT_P, not
+ CONSTANT_P.
+ * config/cris/predicates.md ("cris_call_type_marker"): New predicate.
+ * config/cris/cris.h (CRIS_CONSTANT_P): New macro.
+ (enum cris_symbol_type): Rename from cris_pic_symbol_type. All
+ users changed. Add members cris_offsettable_symbol and cris_unspec.
+ (cris_symbol_type): Rename from cris_pic_symbol_type.
+ * config/cris/constraints.md ("T"): Use CRIS_CONSTANT_P, not
+ just CONSTANT_P.
+ * config/cris/cris-protos.h (cris_symbol_type_of,
+ cris_expand_pic_call_address): Adjust prototypes.
+ (cris_legitimate_constant_p): New prototype.
+
+ * config.gcc (crisv32-*-linux* | cris-*-linux*): Do not override
+ an existing tmake_file. Don't add t-slibgcc and t-linux.
+
+2014-07-16 Jakub Jelinek <jakub@redhat.com>
+
+ * omp-low.c (create_omp_child_function): Don't set DECL_NAMELESS
+ on the FUNCTION_DECL.
+
+ * BASE-VER: Set to 4.9.1.
+ * DEV-PHASE: Set to prerelease.
+
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-07-11 Rong Xu <xur@google.com>
Backport r212462 trunk.
@@ -41,14 +236,14 @@
2014-07-10 Cary Coutant <ccoutant@google.com>
- Backport from trunk at r212211.
+ Backport from trunk at r212211.
* dwarf2out.c (remove_addr_table_entry): Remove unnecessary hash table
- lookup.
+ lookup.
(resolve_addr_in_expr): When replacing the rtx in a location list
- entry, get a new address table entry.
+ entry, get a new address table entry.
(dwarf2out_finish): Call index_location_lists even if there are no
- addr_index_table entries yet.
+ addr_index_table entries yet.
2014-07-10 Tom G. Christensen <tgc@jupiterrise.com>
@@ -70,13 +265,13 @@
PR target/61062
* config/arm/arm_neon.h (vtrn_s8, vtrn_s16, vtrn_u8, vtrn_u16, vtrn_p8,
vtrn_p16, vtrn_s32, vtrn_f32, vtrn_u32, vtrnq_s8, vtrnq_s16, vtrnq_s32,
- vtrnq_f32, vtrnq_u8, vtrnq_u16, vtrnq_u32, vtrnq_p8, vtrnq_p16, vzip_s8,
- vzip_s16, vzip_u8, vzip_u16, vzip_p8, vzip_p16, vzip_s32, vzip_f32,
- vzip_u32, vzipq_s8, vzipq_s16, vzipq_s32, vzipq_f32, vzipq_u8,
- vzipq_u16, vzipq_u32, vzipq_p8, vzipq_p16, vuzp_s8, vuzp_s16, vuzp_s32,
- vuzp_f32, vuzp_u8, vuzp_u16, vuzp_u32, vuzp_p8, vuzp_p16, vuzpq_s8,
- vuzpq_s16, vuzpq_s32, vuzpq_f32, vuzpq_u8, vuzpq_u16, vuzpq_u32,
- vuzpq_p8, vuzpq_p16): Correct mask for bigendian.
+ vtrnq_f32, vtrnq_u8, vtrnq_u16, vtrnq_u32, vtrnq_p8, vtrnq_p16,
+ vzip_s8, vzip_s16, vzip_u8, vzip_u16, vzip_p8, vzip_p16, vzip_s32,
+ vzip_f32, vzip_u32, vzipq_s8, vzipq_s16, vzipq_s32, vzipq_f32,
+ vzipq_u8, vzipq_u16, vzipq_u32, vzipq_p8, vzipq_p16, vuzp_s8, vuzp_s16,
+ vuzp_s32, vuzp_f32, vuzp_u8, vuzp_u16, vuzp_u32, vuzp_p8, vuzp_p16,
+ vuzpq_s8, vuzpq_s16, vuzpq_s32, vuzpq_f32, vuzpq_u8, vuzpq_u16,
+ vuzpq_u32, vuzpq_p8, vuzpq_p16): Correct mask for bigendian.
2014-07-09 Alan Lawrence <alan.lawrence@arm.com>
@@ -194,11 +389,9 @@
2014-06-24 Jakub Jelinek <jakub@redhat.com>
* gimplify.c (gimplify_scan_omp_clauses) <case OMP_CLAUSE_MAP,
- OMP_CLAUSE_TO, OMP_CLAUSE_FROM): Make sure OMP_CLAUSE_SIZE is
- non-NULL.
+ OMP_CLAUSE_TO, OMP_CLAUSE_FROM): Make sure OMP_CLAUSE_SIZE is non-NULL.
<case OMP_CLAUSE_ALIGNED>: Gimplify OMP_CLAUSE_ALIGNED_ALIGNMENT.
- (gimplify_adjust_omp_clauses_1): Make sure OMP_CLAUSE_SIZE is
- non-NULL.
+ (gimplify_adjust_omp_clauses_1): Make sure OMP_CLAUSE_SIZE is non-NULL.
(gimplify_adjust_omp_clauses): Likewise.
* omp-low.c (lower_rec_simd_input_clauses,
lower_rec_input_clauses, expand_omp_simd): Handle non-constant
@@ -213,9 +406,8 @@
2014-06-18 Jakub Jelinek <jakub@redhat.com>
- * gimplify.c (omp_notice_variable): If n is non-NULL
- and no flags change in ORT_TARGET region, don't jump to
- do_outer.
+ * gimplify.c (omp_notice_variable): If n is non-NULL and no flags
+ change in ORT_TARGET region, don't jump to do_outer.
(struct gimplify_adjust_omp_clauses_data): New type.
(gimplify_adjust_omp_clauses_1): Adjust for data being
a struct gimplify_adjust_omp_clauses_data pointer instead
@@ -233,14 +425,12 @@
gimple_seq * argument to omp_finish_clause hook.
* omp-low.c (scan_sharing_clauses): Call scan_omp_op on
non-DECL_P OMP_CLAUSE_DECL if ctx->outer.
- (scan_omp_parallel, lower_omp_for): When adding
- _LOOPTEMP_ clause var, add it to outer ctx's decl_map
- as identity.
+ (scan_omp_parallel, lower_omp_for): When adding _LOOPTEMP_ clause var,
+ add it to outer ctx's decl_map as identity.
* tree-core.h (OMP_CLAUSE_MAP_TO_PSET): New map kind.
* tree-nested.c (convert_nonlocal_omp_clauses,
convert_local_omp_clauses): Handle various OpenMP 4.0 clauses.
- * tree-pretty-print.c (dump_omp_clause): Handle
- OMP_CLAUSE_MAP_TO_PSET.
+ * tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE_MAP_TO_PSET.
2014-06-10 Jakub Jelinek <jakub@redhat.com>
@@ -264,8 +454,7 @@
OMP_CLAUSE_LINEAR_STMT.
* omp-low.c (lower_rec_input_clauses): Fix typo.
(maybe_add_implicit_barrier_cancel, lower_omp_1): Add
- cast between Fortran boolean_type_node and C _Bool if
- needed.
+ cast between Fortran boolean_type_node and C _Bool if needed.
2014-06-30 Jason Merrill <jason@redhat.com>
@@ -316,8 +505,7 @@
(aarch64_sqdmlsl_lane<mode>): Likewise.
(aarch64_sqdmull_lane<mode>): Likewise.
(aarch64_sqdmull2_lane<mode>): Likewise.
- (aarch64_sqdmlal_laneq<mode>):
- Replace VCON usage with VCONQ.
+ (aarch64_sqdmlal_laneq<mode>): Replace VCON usage with VCONQ.
Emit aarch64_sqdmlal_laneq<mode>_internal insn.
(aarch64_sqdmlal2_laneq<mode>): Emit
aarch64_sqdmlal2_laneq<mode>_internal insn.
diff --git a/gcc-4.9/gcc/DATESTAMP b/gcc-4.9/gcc/DATESTAMP
index e48f0e7..06fdc77 100644
--- a/gcc-4.9/gcc/DATESTAMP
+++ b/gcc-4.9/gcc/DATESTAMP
@@ -1 +1 @@
-20140711
+20140801
diff --git a/gcc-4.9/gcc/ada/ChangeLog b/gcc-4.9/gcc/ada/ChangeLog
index f979c34..27d4ad7 100644
--- a/gcc-4.9/gcc/ada/ChangeLog
+++ b/gcc-4.9/gcc/ada/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-05-19 Eric Botcazou <ebotcazou@adacore.com>
Backport from mainline
diff --git a/gcc-4.9/gcc/c-family/ChangeLog b/gcc-4.9/gcc/c-family/ChangeLog
index 1fa0dd0..cbe8b06 100644
--- a/gcc-4.9/gcc/c-family/ChangeLog
+++ b/gcc-4.9/gcc/c-family/ChangeLog
@@ -1,3 +1,17 @@
+2014-07-17 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2014-07-09 Richard Biener <rguenther@suse.de>
+
+ PR c-family/61741
+ * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
+ using unsigned arithmetic if overflow does not wrap instead of
+ if overflow is undefined.
+
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-06-30 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
diff --git a/gcc-4.9/gcc/c-family/c-gimplify.c b/gcc-4.9/gcc/c-family/c-gimplify.c
index d385f3a..0bf93fc 100644
--- a/gcc-4.9/gcc/c-family/c-gimplify.c
+++ b/gcc-4.9/gcc/c-family/c-gimplify.c
@@ -197,9 +197,7 @@ c_gimplify_expr (tree *expr_p, gimple_seq *pre_p ATTRIBUTE_UNUSED,
tree type = TREE_TYPE (TREE_OPERAND (*expr_p, 0));
if (INTEGRAL_TYPE_P (type) && c_promoting_integer_type_p (type))
{
- if (TYPE_OVERFLOW_UNDEFINED (type)
- || ((flag_sanitize & SANITIZE_SI_OVERFLOW)
- && !TYPE_OVERFLOW_WRAPS (type)))
+ if (!TYPE_OVERFLOW_WRAPS (type))
type = unsigned_type_for (type);
return gimplify_self_mod_expr (expr_p, pre_p, post_p, 1, type);
}
diff --git a/gcc-4.9/gcc/c/ChangeLog b/gcc-4.9/gcc/c/ChangeLog
index e31d4a8..4816d5c 100644
--- a/gcc-4.9/gcc/c/ChangeLog
+++ b/gcc-4.9/gcc/c/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-06-30 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
diff --git a/gcc-4.9/gcc/cgraph.c b/gcc-4.9/gcc/cgraph.c
index 180a636..63b7b4d 100644
--- a/gcc-4.9/gcc/cgraph.c
+++ b/gcc-4.9/gcc/cgraph.c
@@ -677,7 +677,11 @@ cgraph_node_for_asm (tree asmname)
{
cgraph_node *cn = dyn_cast <cgraph_node> (node);
if (cn && !cn->global.inlined_to)
- return cn;
+ {
+ if (L_IPO_COMP_MODE && cgraph_pre_profiling_inlining_done)
+ return cgraph_lipo_get_resolved_node (cn->decl);
+ return cn;
+ }
}
return NULL;
}
diff --git a/gcc-4.9/gcc/common.opt b/gcc-4.9/gcc/common.opt
index 6614228..4060773 100644
--- a/gcc-4.9/gcc/common.opt
+++ b/gcc-4.9/gcc/common.opt
@@ -1259,6 +1259,10 @@ fexceptions
Common Report Var(flag_exceptions) Optimization
Enable exception handling
+fdefault-noexcept
+Common Report Var(flag_default_noexcept) Optimization Init(0)
+Make functions no-throw/noexcept by default
+
fexpensive-optimizations
Common Report Var(flag_expensive_optimizations) Optimization
Perform a number of minor, expensive optimizations
diff --git a/gcc-4.9/gcc/config.gcc b/gcc-4.9/gcc/config.gcc
index c4851d3..0250fd1 100644
--- a/gcc-4.9/gcc/config.gcc
+++ b/gcc-4.9/gcc/config.gcc
@@ -432,7 +432,7 @@ nds32*)
nios2-*-*)
cpu_type=nios2
extra_options="${extra_options} g.opt"
- ;;
+ ;;
picochip-*-*)
cpu_type=picochip
;;
@@ -1156,8 +1156,7 @@ cris-*-elf | cris-*-none)
;;
crisv32-*-linux* | cris-*-linux*)
tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h glibc-stdint.h cris/linux.h"
- # We need to avoid using t-linux, so override default tmake_file
- tmake_file="cris/t-cris cris/t-linux t-slibgcc t-linux"
+ tmake_file="${tmake_file} cris/t-cris cris/t-linux"
extra_options="${extra_options} cris/linux.opt"
case $target in
cris-*-*)
@@ -2245,6 +2244,10 @@ nios2-*-*)
tm_file="${tm_file} newlib-stdint.h nios2/elf.h"
extra_options="${extra_options} nios2/elf.opt"
;;
+ nios2-*-rtems*)
+ tm_file="${tm_file} newlib-stdint.h nios2/rtems.h rtems.h"
+ tmake_file="${tmake_file} t-rtems nios2/t-rtems"
+ ;;
esac
;;
pdp11-*-*)
@@ -2351,7 +2354,7 @@ powerpc-*-rtems*)
tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
;;
powerpc*-*-linux*)
- tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h"
+ tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h linux-android.h"
extra_options="${extra_options} rs6000/sysv4.opt"
extra_options="${extra_options} linux-android.opt"
tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
diff --git a/gcc-4.9/gcc/config/aarch64/aarch64-linux.h b/gcc-4.9/gcc/config/aarch64/aarch64-linux.h
index f8a97c8..3a180bb 100644
--- a/gcc-4.9/gcc/config/aarch64/aarch64-linux.h
+++ b/gcc-4.9/gcc/config/aarch64/aarch64-linux.h
@@ -47,4 +47,6 @@
} \
while (0)
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
+
#endif /* GCC_AARCH64_LINUX_H */
diff --git a/gcc-4.9/gcc/config/aarch64/aarch64.c b/gcc-4.9/gcc/config/aarch64/aarch64.c
index bf35031..07430a4 100644
--- a/gcc-4.9/gcc/config/aarch64/aarch64.c
+++ b/gcc-4.9/gcc/config/aarch64/aarch64.c
@@ -5257,6 +5257,20 @@ aarch64_override_options (void)
aarch64_tune_params = selected_tune->tune;
aarch64_override_options_after_change ();
+
+ if (TARGET_ANDROID)
+ {
+ /* Lower the complete unroll code size limits.
+ Loop unroll needs some tuning in arm and aarch64. */
+ maybe_set_param_value (PARAM_MAX_DEFAULT_COMPLETELY_PEELED_INSNS, 50,
+ global_options.x_param_values,
+ global_options_set.x_param_values);
+
+ /* Disable array_bound warning. Work around isses
+ introduced in complete unroll. */
+ global_options.x_warn_array_bounds = 0;
+ }
+
}
/* Implement targetm.override_options_after_change. */
diff --git a/gcc-4.9/gcc/config/alpha/elf.h b/gcc-4.9/gcc/config/alpha/elf.h
index 6ae4065..e334fc4 100644
--- a/gcc-4.9/gcc/config/alpha/elf.h
+++ b/gcc-4.9/gcc/config/alpha/elf.h
@@ -126,6 +126,10 @@ do { \
"%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
+/* This variable should be set to 'true' if the target ABI requires
+ unwinding tables even when exceptions are not used. */
+#define TARGET_UNWIND_TABLES_DEFAULT true
+
/* Select a format to encode pointers in exception handling data. CODE
is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
true if the symbol may be affected by dynamic relocations.
diff --git a/gcc-4.9/gcc/config/arm/t-rtems-eabi b/gcc-4.9/gcc/config/arm/t-rtems-eabi
index d81fbf7..92c4dcb 100644
--- a/gcc-4.9/gcc/config/arm/t-rtems-eabi
+++ b/gcc-4.9/gcc/config/arm/t-rtems-eabi
@@ -1,47 +1,167 @@
# Custom RTEMS EABI multilibs
-MULTILIB_OPTIONS = mthumb march=armv6-m/march=armv7-a/march=armv7-r/march=armv7-m mfpu=neon mfloat-abi=hard
-MULTILIB_DIRNAMES = thumb armv6-m armv7-a armv7-r armv7-m neon hard
+MULTILIB_OPTIONS = mbig-endian mthumb march=armv6-m/march=armv7-a/march=armv7-r/march=armv7-m mfpu=neon/mfpu=vfpv3-d16/mfpu=fpv4-sp-d16 mfloat-abi=hard
+MULTILIB_DIRNAMES = eb thumb armv6-m armv7-a armv7-r armv7-m neon vfpv3-d16 fpv4-sp-d16 hard
# Enumeration of multilibs
MULTILIB_EXCEPTIONS =
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=neon
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfpu=fpv4-sp-d16
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv6-m
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=neon
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfpu=fpv4-sp-d16
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-a
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=neon
+# MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfpu=fpv4-sp-d16
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r/mfloat-abi=hard
+# MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-r
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=neon
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfpu=fpv4-sp-d16
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/march=armv7-m
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=neon/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=neon
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfpu=fpv4-sp-d16
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mthumb
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=neon/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=neon
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfpu=fpv4-sp-d16
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv6-m
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=neon/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=neon
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfpu=fpv4-sp-d16
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-a
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=neon/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=neon
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfpu=fpv4-sp-d16
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-r
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=neon/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=neon
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfpu=fpv4-sp-d16
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/march=armv7-m
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=neon/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=neon
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian/mfpu=fpv4-sp-d16
+MULTILIB_EXCEPTIONS += mbig-endian/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mbig-endian
MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon/mfloat-abi=hard
MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=neon
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfpu=fpv4-sp-d16
MULTILIB_EXCEPTIONS += mthumb/march=armv6-m/mfloat-abi=hard
# MULTILIB_EXCEPTIONS += mthumb/march=armv6-m
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=neon
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfpu=fpv4-sp-d16
MULTILIB_EXCEPTIONS += mthumb/march=armv7-a/mfloat-abi=hard
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-a
MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon/mfloat-abi=hard
MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=neon
+# MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfpu=fpv4-sp-d16
MULTILIB_EXCEPTIONS += mthumb/march=armv7-r/mfloat-abi=hard
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-r
MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon/mfloat-abi=hard
MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=neon
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=vfpv3-d16
+# MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfpu=fpv4-sp-d16
MULTILIB_EXCEPTIONS += mthumb/march=armv7-m/mfloat-abi=hard
# MULTILIB_EXCEPTIONS += mthumb/march=armv7-m
MULTILIB_EXCEPTIONS += mthumb/mfpu=neon/mfloat-abi=hard
MULTILIB_EXCEPTIONS += mthumb/mfpu=neon
+MULTILIB_EXCEPTIONS += mthumb/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mthumb/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += mthumb/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mthumb/mfpu=fpv4-sp-d16
MULTILIB_EXCEPTIONS += mthumb/mfloat-abi=hard
# MULTILIB_EXCEPTIONS += mthumb
MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon/mfloat-abi=hard
MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=neon
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += march=armv6-m/mfpu=fpv4-sp-d16
MULTILIB_EXCEPTIONS += march=armv6-m/mfloat-abi=hard
MULTILIB_EXCEPTIONS += march=armv6-m
MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon/mfloat-abi=hard
MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=neon
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += march=armv7-a/mfpu=fpv4-sp-d16
MULTILIB_EXCEPTIONS += march=armv7-a/mfloat-abi=hard
MULTILIB_EXCEPTIONS += march=armv7-a
MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon/mfloat-abi=hard
MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=neon
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += march=armv7-r/mfpu=fpv4-sp-d16
MULTILIB_EXCEPTIONS += march=armv7-r/mfloat-abi=hard
MULTILIB_EXCEPTIONS += march=armv7-r
MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon/mfloat-abi=hard
MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=neon
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += march=armv7-m/mfpu=fpv4-sp-d16
MULTILIB_EXCEPTIONS += march=armv7-m/mfloat-abi=hard
MULTILIB_EXCEPTIONS += march=armv7-m
MULTILIB_EXCEPTIONS += mfpu=neon/mfloat-abi=hard
MULTILIB_EXCEPTIONS += mfpu=neon
+MULTILIB_EXCEPTIONS += mfpu=vfpv3-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mfpu=vfpv3-d16
+MULTILIB_EXCEPTIONS += mfpu=fpv4-sp-d16/mfloat-abi=hard
+MULTILIB_EXCEPTIONS += mfpu=fpv4-sp-d16
MULTILIB_EXCEPTIONS += mfloat-abi=hard
diff --git a/gcc-4.9/gcc/config/cris/constraints.md b/gcc-4.9/gcc/config/cris/constraints.md
index 651fbed..f927cca 100644
--- a/gcc-4.9/gcc/config/cris/constraints.md
+++ b/gcc-4.9/gcc/config/cris/constraints.md
@@ -118,7 +118,7 @@
reload_in_progress
|| reload_completed)"))
;; Just an explicit indirect reference: [const]?
- (match_test "CONSTANT_P (XEXP (op, 0))")
+ (match_test "CRIS_CONSTANT_P (XEXP (op, 0))")
;; Something that is indexed; [...+...]?
(and (match_code "plus" "0")
;; A BDAP constant: [reg+(8|16|32)bit offset]?
@@ -159,6 +159,8 @@
(define_constraint "U"
"@internal"
(and (match_test "flag_pic")
+ ;; We're just interested in the ..._or_callable_symbol part.
+ ;; (Using CRIS_CONSTANT_P would exclude that too.)
(match_test "CONSTANT_P (op)")
(match_operand 0 "cris_nonmemory_operand_or_callable_symbol")))
diff --git a/gcc-4.9/gcc/config/cris/cris-protos.h b/gcc-4.9/gcc/config/cris/cris-protos.h
index 0fdcafe..b09babd 100644
--- a/gcc-4.9/gcc/config/cris/cris-protos.h
+++ b/gcc-4.9/gcc/config/cris/cris-protos.h
@@ -31,8 +31,9 @@ extern bool cris_cc0_user_requires_cmp (rtx);
extern rtx cris_return_addr_rtx (int, rtx);
extern rtx cris_split_movdx (rtx *);
extern int cris_legitimate_pic_operand (rtx);
-extern enum cris_pic_symbol_type cris_pic_symbol_type_of (const_rtx);
+extern enum cris_symbol_type cris_symbol_type_of (const_rtx);
extern bool cris_valid_pic_const (const_rtx, bool);
+extern bool cris_legitimate_constant_p (enum machine_mode, rtx);
extern bool cris_constant_index_p (const_rtx);
extern bool cris_base_p (const_rtx, bool);
extern bool cris_base_or_autoincr_p (const_rtx, bool);
@@ -46,7 +47,7 @@ extern int cris_cfun_uses_pic_table (void);
extern void cris_asm_output_case_end (FILE *, int, rtx);
extern rtx cris_gen_movem_load (rtx, rtx, int);
extern rtx cris_emit_movem_store (rtx, rtx, int, bool);
-extern void cris_expand_pic_call_address (rtx *);
+extern void cris_expand_pic_call_address (rtx *, rtx *);
extern void cris_order_for_addsi3 (rtx *, int);
extern void cris_emit_trap_for_misalignment (rtx);
#endif /* RTX_CODE */
diff --git a/gcc-4.9/gcc/config/cris/cris.c b/gcc-4.9/gcc/config/cris/cris.c
index 209f127..c15139f 100644
--- a/gcc-4.9/gcc/config/cris/cris.c
+++ b/gcc-4.9/gcc/config/cris/cris.c
@@ -147,6 +147,7 @@ static rtx cris_function_incoming_arg (cumulative_args_t,
static void cris_function_arg_advance (cumulative_args_t, enum machine_mode,
const_tree, bool);
static tree cris_md_asm_clobbers (tree, tree, tree);
+static bool cris_cannot_force_const_mem (enum machine_mode, rtx);
static void cris_option_override (void);
@@ -214,6 +215,9 @@ int cris_cpu_version = CRIS_DEFAULT_CPU_VERSION;
#undef TARGET_LEGITIMATE_ADDRESS_P
#define TARGET_LEGITIMATE_ADDRESS_P cris_legitimate_address_p
+#undef TARGET_LEGITIMATE_CONSTANT_P
+#define TARGET_LEGITIMATE_CONSTANT_P cris_legitimate_constant_p
+
#undef TARGET_PREFERRED_RELOAD_CLASS
#define TARGET_PREFERRED_RELOAD_CLASS cris_preferred_reload_class
@@ -248,6 +252,10 @@ int cris_cpu_version = CRIS_DEFAULT_CPU_VERSION;
#define TARGET_FUNCTION_ARG_ADVANCE cris_function_arg_advance
#undef TARGET_MD_ASM_CLOBBERS
#define TARGET_MD_ASM_CLOBBERS cris_md_asm_clobbers
+
+#undef TARGET_CANNOT_FORCE_CONST_MEM
+#define TARGET_CANNOT_FORCE_CONST_MEM cris_cannot_force_const_mem
+
#undef TARGET_FRAME_POINTER_REQUIRED
#define TARGET_FRAME_POINTER_REQUIRED cris_frame_pointer_required
@@ -506,6 +514,21 @@ cris_cfun_uses_pic_table (void)
return crtl->uses_pic_offset_table;
}
+/* Worker function for TARGET_CANNOT_FORCE_CONST_MEM.
+ We can't put PIC addresses in the constant pool, not even the ones that
+ can be reached as pc-relative as we can't tell when or how to do that. */
+
+static bool
+cris_cannot_force_const_mem (enum machine_mode mode ATTRIBUTE_UNUSED, rtx x)
+{
+ enum cris_symbol_type t = cris_symbol_type_of (x);
+
+ return
+ t == cris_unspec
+ || t == cris_got_symbol
+ || t == cris_rel_symbol;
+}
+
/* Given an rtx, return the text string corresponding to the CODE of X.
Intended for use in the assembly language output section of a
define_insn. */
@@ -601,7 +624,7 @@ cris_print_index (rtx index, FILE *file)
if (REG_P (index))
fprintf (file, "$%s.b", reg_names[REGNO (index)]);
- else if (CONSTANT_P (index))
+ else if (CRIS_CONSTANT_P (index))
cris_output_addr_const (file, index);
else if (GET_CODE (index) == MULT)
{
@@ -1041,7 +1064,7 @@ cris_print_operand (FILE *file, rtx x, int code)
/* If this is a GOT symbol, force it to be emitted as :GOT and
:GOTPLT regardless of -fpic (i.e. not as :GOT16, :GOTPLT16).
Avoid making this too much of a special case. */
- if (flag_pic == 1 && CONSTANT_P (operand))
+ if (flag_pic == 1 && CRIS_CONSTANT_P (operand))
{
int flag_pic_save = flag_pic;
@@ -1161,7 +1184,7 @@ cris_print_operand (FILE *file, rtx x, int code)
default:
/* No need to handle all strange variants, let output_addr_const
do it for us. */
- if (CONSTANT_P (operand))
+ if (CRIS_CONSTANT_P (operand))
{
cris_output_addr_const (file, operand);
return;
@@ -1358,7 +1381,7 @@ reg_ok_for_index_p (const_rtx x, bool strict)
bool
cris_constant_index_p (const_rtx x)
{
- return (CONSTANT_P (x) && (!flag_pic || cris_valid_pic_const (x, true)));
+ return (CRIS_CONSTANT_P (x) && (!flag_pic || cris_valid_pic_const (x, true)));
}
/* True if X is a valid base register. */
@@ -1467,6 +1490,29 @@ cris_legitimate_address_p (enum machine_mode mode, rtx x, bool strict)
return false;
}
+/* Worker function for TARGET_LEGITIMATE_CONSTANT_P. We have to handle
+ PIC constants that aren't legitimized. FIXME: there used to be a
+ guarantee that the target LEGITIMATE_CONSTANT_P didn't have to handle
+ PIC constants, but no more (4.7 era); testcase: glibc init-first.c.
+ While that may be seen as a bug, that guarantee seems a wart by design,
+ so don't bother; fix the documentation instead. */
+
+bool
+cris_legitimate_constant_p (enum machine_mode mode ATTRIBUTE_UNUSED, rtx x)
+{
+ enum cris_symbol_type t;
+
+ if (flag_pic)
+ return LEGITIMATE_PIC_OPERAND_P (x);
+
+ t = cris_symbol_type_of (x);
+
+ return
+ t == cris_no_symbol
+ || t == cris_offsettable_symbol
+ || t == cris_unspec;
+}
+
/* Worker function for LEGITIMIZE_RELOAD_ADDRESS. */
bool
@@ -2214,7 +2260,7 @@ cris_address_cost (rtx x, enum machine_mode mode ATTRIBUTE_UNUSED,
return (2 + 2) / 2;
/* A BDAP with some other constant is 2 bytes extra. */
- if (CONSTANT_P (tem2))
+ if (CRIS_CONSTANT_P (tem2))
return (2 + 2 + 2) / 2;
/* BDAP with something indirect should have a higher cost than
@@ -2312,7 +2358,7 @@ cris_side_effect_mode_ok (enum rtx_code code, rtx *ops,
return 0;
/* Check allowed cases, like [r(+)?].[bwd] and const. */
- if (CONSTANT_P (val_rtx))
+ if (CRIS_CONSTANT_P (val_rtx))
return 1;
if (MEM_P (val_rtx)
@@ -2464,32 +2510,34 @@ cris_valid_pic_const (const_rtx x, bool any_operand)
gcc_unreachable ();
}
- return cris_pic_symbol_type_of (x) == cris_no_symbol;
+ return cris_symbol_type_of (x) == cris_no_symbol;
}
-/* Helper function to find the right PIC-type symbol to generate,
+/* Helper function to find the right symbol-type to generate,
given the original (non-PIC) representation. */
-enum cris_pic_symbol_type
-cris_pic_symbol_type_of (const_rtx x)
+enum cris_symbol_type
+cris_symbol_type_of (const_rtx x)
{
switch (GET_CODE (x))
{
case SYMBOL_REF:
- return SYMBOL_REF_LOCAL_P (x)
- ? cris_rel_symbol : cris_got_symbol;
+ return flag_pic
+ ? (SYMBOL_REF_LOCAL_P (x)
+ ? cris_rel_symbol : cris_got_symbol)
+ : cris_offsettable_symbol;
case LABEL_REF:
- return cris_rel_symbol;
+ return flag_pic ? cris_rel_symbol : cris_offsettable_symbol;
case CONST:
- return cris_pic_symbol_type_of (XEXP (x, 0));
+ return cris_symbol_type_of (XEXP (x, 0));
case PLUS:
case MINUS:
{
- enum cris_pic_symbol_type t1 = cris_pic_symbol_type_of (XEXP (x, 0));
- enum cris_pic_symbol_type t2 = cris_pic_symbol_type_of (XEXP (x, 1));
+ enum cris_symbol_type t1 = cris_symbol_type_of (XEXP (x, 0));
+ enum cris_symbol_type t2 = cris_symbol_type_of (XEXP (x, 1));
gcc_assert (t1 == cris_no_symbol || t2 == cris_no_symbol);
@@ -2504,9 +2552,7 @@ cris_pic_symbol_type_of (const_rtx x)
return cris_no_symbol;
case UNSPEC:
- /* Likely an offsettability-test attempting to add a constant to
- a GOTREAD symbol, which can't be handled. */
- return cris_invalid_pic_symbol;
+ return cris_unspec;
default:
fatal_insn ("unrecognized supposed constant", x);
@@ -3714,19 +3760,19 @@ cris_emit_movem_store (rtx dest, rtx nregs_rtx, int increment,
/* Worker function for expanding the address for PIC function calls. */
void
-cris_expand_pic_call_address (rtx *opp)
+cris_expand_pic_call_address (rtx *opp, rtx *markerp)
{
rtx op = *opp;
- gcc_assert (MEM_P (op));
+ gcc_assert (flag_pic && MEM_P (op));
op = XEXP (op, 0);
/* It might be that code can be generated that jumps to 0 (or to a
specific address). Don't die on that. (There is a
testcase.) */
- if (CONSTANT_ADDRESS_P (op) && !CONST_INT_P (op))
+ if (CONSTANT_P (op) && !CONST_INT_P (op))
{
- enum cris_pic_symbol_type t = cris_pic_symbol_type_of (op);
+ enum cris_symbol_type t = cris_symbol_type_of (op);
CRIS_ASSERT (can_create_pseudo_p ());
@@ -3752,18 +3798,21 @@ cris_expand_pic_call_address (rtx *opp)
}
else
op = force_reg (Pmode, op);
+
+ /* A local call. */
+ *markerp = const0_rtx;
}
else if (t == cris_got_symbol)
{
if (TARGET_AVOID_GOTPLT)
{
/* Change a "jsr sym" into (allocate register rM, rO)
- "move.d (const (unspec [sym rPIC] CRIS_UNSPEC_PLT_GOTREL)),rM"
+ "move.d (const (unspec [sym] CRIS_UNSPEC_PLT_GOTREL)),rM"
"add.d rPIC,rM,rO", "jsr rO" for pre-v32 and
- "jsr (const (unspec [sym rPIC] CRIS_UNSPEC_PLT_PCREL))"
+ "jsr (const (unspec [sym] CRIS_UNSPEC_PLT_PCREL))"
for v32. */
rtx tem, rm, ro;
- gcc_assert (can_create_pseudo_p ());
+
crtl->uses_pic_offset_table = 1;
tem = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, op),
TARGET_V32
@@ -3817,14 +3866,27 @@ cris_expand_pic_call_address (rtx *opp)
MEM_NOTRAP_P (mem) = 1;
op = mem;
}
+
+ /* We need to prepare this call to go through the PLT; we
+ need to make GOT available. */
+ *markerp = pic_offset_table_rtx;
}
else
- /* Can't possibly get a GOT-needing-fixup for a function-call,
- right? */
+ /* Can't possibly get anything else for a function-call, right? */
fatal_insn ("unidentifiable call op", op);
- *opp = replace_equiv_address (*opp, op);
+ /* If the validizing variant is called, it will try to validize
+ the address as a valid any-operand constant, but as it's only
+ valid for calls and moves, it will fail and always be forced
+ into a register. */
+ *opp = replace_equiv_address_nv (*opp, op);
}
+ else
+ /* Can't tell what locality a call to a non-constant address has;
+ better make the GOT register alive at it.
+ FIXME: Can we see whether the register has known constant
+ contents? */
+ *markerp = pic_offset_table_rtx;
}
/* Make sure operands are in the right order for an addsi3 insn as
diff --git a/gcc-4.9/gcc/config/cris/cris.h b/gcc-4.9/gcc/config/cris/cris.h
index 37b562e..c5aa83e 100644
--- a/gcc-4.9/gcc/config/cris/cris.h
+++ b/gcc-4.9/gcc/config/cris/cris.h
@@ -794,6 +794,12 @@ struct cum_args {int regs;};
} \
while (0)
+/* The mode argument to cris_legitimate_constant_p isn't used, so just
+ pass a cheap dummy. N.B. we have to cast away const from the
+ parameter rather than adjust the parameter, as it's type is mandated
+ by the TARGET_LEGITIMATE_CONSTANT_P target hook interface. */
+#define CRIS_CONSTANT_P(X) \
+ (CONSTANT_P (X) && cris_legitimate_constant_p (VOIDmode, CONST_CAST_RTX (X)))
/* Node: Condition Code */
@@ -833,13 +839,14 @@ struct cum_args {int regs;};
/* Helper type. */
-enum cris_pic_symbol_type
+enum cris_symbol_type
{
cris_no_symbol = 0,
cris_got_symbol = 1,
cris_rel_symbol = 2,
cris_got_symbol_needing_fixup = 3,
- cris_invalid_pic_symbol = 4
+ cris_unspec = 7,
+ cris_offsettable_symbol = 8
};
#define PIC_OFFSET_TABLE_REGNUM (flag_pic ? CRIS_GOT_REGNUM : INVALID_REGNUM)
diff --git a/gcc-4.9/gcc/config/cris/cris.md b/gcc-4.9/gcc/config/cris/cris.md
index 47f6451..18b9787 100644
--- a/gcc-4.9/gcc/config/cris/cris.md
+++ b/gcc-4.9/gcc/config/cris/cris.md
@@ -919,6 +919,8 @@
(match_operand:SI 1 "cris_general_operand_or_symbol" ""))]
""
{
+ enum cris_symbol_type t;
+
/* If the output goes to a MEM, make sure we have zero or a register as
input. */
if (MEM_P (operands[0])
@@ -934,12 +936,12 @@
valid symbol? Can we exclude global PIC addresses with an added
offset? */
if (flag_pic
- && CONSTANT_ADDRESS_P (operands[1])
+ && CONSTANT_P (operands[1])
&& !cris_valid_pic_const (operands[1], false))
{
- enum cris_pic_symbol_type t = cris_pic_symbol_type_of (operands[1]);
+ t = cris_symbol_type_of (operands[1]);
- gcc_assert (t != cris_no_symbol);
+ gcc_assert (t != cris_no_symbol && t != cris_offsettable_symbol);
if (! REG_S_P (operands[0]))
{
@@ -1086,7 +1088,12 @@
if (!flag_pic
&& (GET_CODE (operands[1]) == SYMBOL_REF
|| GET_CODE (operands[1]) == LABEL_REF
- || GET_CODE (operands[1]) == CONST))
+ || (GET_CODE (operands[1]) == CONST
+ && (GET_CODE (XEXP (operands[1], 0)) != UNSPEC
+ || (XINT (XEXP (operands[1], 0), 1)
+ == CRIS_UNSPEC_PLT_PCREL)
+ || (XINT (XEXP (operands[1], 0), 1)
+ == CRIS_UNSPEC_PCREL)))))
{
/* FIXME: Express this through (set_attr cc none) instead,
since we can't express the ``none'' at this point. FIXME:
@@ -1169,6 +1176,12 @@
case CRIS_UNSPEC_PCREL:
case CRIS_UNSPEC_PLT_PCREL:
gcc_assert (TARGET_V32);
+ /* LAPC doesn't set condition codes; clear them to make the
+ (equivalence-marked) result of this insn not presumed
+ present. This instruction can be a PIC symbol load (for
+ a hidden symbol) which for weak symbols will be followed
+ by a test for NULL. */
+ CC_STATUS_INIT;
return "lapc %1,%0";
default:
@@ -3710,15 +3723,16 @@
{
gcc_assert (MEM_P (operands[0]));
if (flag_pic)
- cris_expand_pic_call_address (&operands[0]);
+ cris_expand_pic_call_address (&operands[0], &operands[1]);
+ else
+ operands[1] = const0_rtx;
})
-;; Accept *anything* as operand 1. Accept operands for operand 0 in
-;; order of preference.
+;; Accept operands for operand 0 in order of preference.
(define_insn "*expanded_call_non_v32"
[(call (mem:QI (match_operand:SI 0 "general_operand" "r,Q>,g"))
- (match_operand 1 "" ""))
+ (match_operand:SI 1 "cris_call_type_marker" "rM,rM,rM"))
(clobber (reg:SI CRIS_SRP_REGNUM))]
"!TARGET_V32"
"jsr %0")
@@ -3727,7 +3741,7 @@
[(call
(mem:QI
(match_operand:SI 0 "cris_nonmemory_operand_or_callable_symbol" "n,r,U,i"))
- (match_operand 1 "" ""))
+ (match_operand:SI 1 "cris_call_type_marker" "rM,rM,rM,rM"))
(clobber (reg:SI CRIS_SRP_REGNUM))]
"TARGET_V32"
"@
@@ -3740,19 +3754,21 @@
;; Parallel when calculating and reusing address of indirect pointer
;; with simple offset. (Makes most sense with PIC.) It looks a bit
;; wrong not to have the clobber last, but that's the way combine
-;; generates it (except it doesn' look into the *inner* mem, so this
+;; generates it (except it doesn't look into the *inner* mem, so this
;; just matches a peephole2). FIXME: investigate that.
(define_insn "*expanded_call_side"
[(call (mem:QI
(mem:SI
(plus:SI (match_operand:SI 0 "cris_bdap_operand" "%r, r,r")
(match_operand:SI 1 "cris_bdap_operand" "r>Rn,r,>Rn"))))
- (match_operand 2 "" ""))
+ (match_operand:SI 2 "cris_call_type_marker" "rM,rM,rM"))
(clobber (reg:SI CRIS_SRP_REGNUM))
(set (match_operand:SI 3 "register_operand" "=*0,r,r")
(plus:SI (match_dup 0)
(match_dup 1)))]
- "!TARGET_AVOID_GOTPLT && !TARGET_V32"
+ ;; Disabled until after reload until we can avoid an output reload for
+ ;; operand 3 (being forbidden for call insns).
+ "reload_completed && !TARGET_AVOID_GOTPLT && !TARGET_V32"
"jsr [%3=%0%S1]")
(define_expand "call_value"
@@ -3764,10 +3780,12 @@
{
gcc_assert (MEM_P (operands[1]));
if (flag_pic)
- cris_expand_pic_call_address (&operands[1]);
+ cris_expand_pic_call_address (&operands[1], &operands[2]);
+ else
+ operands[2] = const0_rtx;
})
-;; Accept *anything* as operand 2. The validity other than "general" of
+;; The validity other than "general" of
;; operand 0 will be checked elsewhere. Accept operands for operand 1 in
;; order of preference (Q includes r, but r is shorter, faster).
;; We also accept a PLT symbol. We output it as [rPIC+sym:GOTPLT] rather
@@ -3776,7 +3794,7 @@
(define_insn "*expanded_call_value_non_v32"
[(set (match_operand 0 "nonimmediate_operand" "=g,g,g")
(call (mem:QI (match_operand:SI 1 "general_operand" "r,Q>,g"))
- (match_operand 2 "" "")))
+ (match_operand:SI 2 "cris_call_type_marker" "rM,rM,rM")))
(clobber (reg:SI CRIS_SRP_REGNUM))]
"!TARGET_V32"
"Jsr %1"
@@ -3790,12 +3808,14 @@
(mem:SI
(plus:SI (match_operand:SI 1 "cris_bdap_operand" "%r, r,r")
(match_operand:SI 2 "cris_bdap_operand" "r>Rn,r,>Rn"))))
- (match_operand 3 "" "")))
+ (match_operand:SI 3 "cris_call_type_marker" "rM,rM,rM")))
(clobber (reg:SI CRIS_SRP_REGNUM))
(set (match_operand:SI 4 "register_operand" "=*1,r,r")
(plus:SI (match_dup 1)
(match_dup 2)))]
- "!TARGET_AVOID_GOTPLT && !TARGET_V32"
+ ;; Disabled until after reload until we can avoid an output reload for
+ ;; operand 4 (being forbidden for call insns).
+ "reload_completed && !TARGET_AVOID_GOTPLT && !TARGET_V32"
"Jsr [%4=%1%S2]"
[(set_attr "cc" "clobber")])
@@ -3805,7 +3825,7 @@
(call
(mem:QI
(match_operand:SI 1 "cris_nonmemory_operand_or_callable_symbol" "n,r,U,i"))
- (match_operand 2 "" "")))
+ (match_operand:SI 2 "cris_call_type_marker" "rM,rM,rM,rM")))
(clobber (reg:SI 16))]
"TARGET_V32"
"@
@@ -4827,7 +4847,7 @@
/* Make sure we have canonical RTX so we match the insn pattern -
not a constant in the first operand. We also require the order
(plus reg mem) to match the final pattern. */
- if (CONSTANT_P (otherop) || MEM_P (otherop))
+ if (CRIS_CONSTANT_P (otherop) || MEM_P (otherop))
{
operands[7] = operands[1];
operands[8] = otherop;
@@ -4878,7 +4898,7 @@
/* Make sure we have canonical RTX so we match the insn pattern -
not a constant in the first operand. We also require the order
(plus reg mem) to match the final pattern. */
- if (CONSTANT_P (otherop) || MEM_P (otherop))
+ if (CRIS_CONSTANT_P (otherop) || MEM_P (otherop))
{
operands[7] = operands[1];
operands[8] = otherop;
diff --git a/gcc-4.9/gcc/config/cris/predicates.md b/gcc-4.9/gcc/config/cris/predicates.md
index 0169b0b..ddb090e 100644
--- a/gcc-4.9/gcc/config/cris/predicates.md
+++ b/gcc-4.9/gcc/config/cris/predicates.md
@@ -142,7 +142,7 @@
(ior (match_operand 0 "general_operand")
(and (match_code "const, symbol_ref, label_ref")
; The following test is actually just an assertion.
- (match_test "cris_pic_symbol_type_of (op) != cris_no_symbol"))))
+ (match_test "cris_symbol_type_of (op) != cris_no_symbol"))))
;; A predicate for the anon movsi expansion, one that fits a PCREL
;; operand as well as general_operand.
@@ -176,3 +176,15 @@
(ior (match_operand 0 "memory_operand")
(match_test "cris_general_operand_or_symbol (XEXP (op, 0),
Pmode)"))))
+
+;; A marker for the call-insn: (const_int 0) for a call to a
+;; hidden or static function and non-pic and
+;; pic_offset_table_rtx for a call that *might* go through the
+;; PLT.
+
+(define_predicate "cris_call_type_marker"
+ (ior (and (match_operand 0 "const_int_operand")
+ (match_test "op == const0_rtx"))
+ (and (and (match_operand 0 "register_operand")
+ (match_test "op == pic_offset_table_rtx"))
+ (match_test "flag_pic != 0"))))
diff --git a/gcc-4.9/gcc/config/i386/avx512fintrin.h b/gcc-4.9/gcc/config/i386/avx512fintrin.h
index 314895a..c4caa5a 100644
--- a/gcc-4.9/gcc/config/i386/avx512fintrin.h
+++ b/gcc-4.9/gcc/config/i386/avx512fintrin.h
@@ -8103,6 +8103,22 @@ _mm512_stream_load_si512 (void *__P)
return __builtin_ia32_movntdqa512 ((__v8di *)__P);
}
+/* Constants for mantissa extraction */
+typedef enum
+{
+ _MM_MANT_NORM_1_2, /* interval [1, 2) */
+ _MM_MANT_NORM_p5_2, /* interval [0.5, 2) */
+ _MM_MANT_NORM_p5_1, /* interval [0.5, 1) */
+ _MM_MANT_NORM_p75_1p5 /* interval [0.75, 1.5) */
+} _MM_MANTISSA_NORM_ENUM;
+
+typedef enum
+{
+ _MM_MANT_SIGN_src, /* sign = sign(SRC) */
+ _MM_MANT_SIGN_zero, /* sign = 0 */
+ _MM_MANT_SIGN_nan /* DEST = NaN if sign(SRC) = 1 */
+} _MM_MANTISSA_SIGN_ENUM;
+
#ifdef __OPTIMIZE__
extern __inline __m128
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
@@ -8182,22 +8198,6 @@ _mm512_maskz_getexp_round_pd (__mmask8 __U, __m512d __A, const int __R)
(__mmask8) __U, __R);
}
-/* Constants for mantissa extraction */
-typedef enum
-{
- _MM_MANT_NORM_1_2, /* interval [1, 2) */
- _MM_MANT_NORM_p5_2, /* interval [0.5, 2) */
- _MM_MANT_NORM_p5_1, /* interval [0.5, 1) */
- _MM_MANT_NORM_p75_1p5 /* interval [0.75, 1.5) */
-} _MM_MANTISSA_NORM_ENUM;
-
-typedef enum
-{
- _MM_MANT_SIGN_src, /* sign = sign(SRC) */
- _MM_MANT_SIGN_zero, /* sign = 0 */
- _MM_MANT_SIGN_nan /* DEST = NaN if sign(SRC) = 1 */
-} _MM_MANTISSA_SIGN_ENUM;
-
extern __inline __m512d
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_getmant_round_pd (__m512d __A, _MM_MANTISSA_NORM_ENUM __B,
diff --git a/gcc-4.9/gcc/config/i386/i386.c b/gcc-4.9/gcc/config/i386/i386.c
index df50433..70f18ad 100644
--- a/gcc-4.9/gcc/config/i386/i386.c
+++ b/gcc-4.9/gcc/config/i386/i386.c
@@ -6556,7 +6556,7 @@ classify_argument (enum machine_mode mode, const_tree type,
bit_offset);
if (!num)
return 0;
- for (i = 0; i < num; i++)
+ for (i = 0; i < num && i < words; i++)
classes[i] = merge_classes (subclasses[i], classes[i]);
}
}
diff --git a/gcc-4.9/gcc/config/i386/ia32intrin.h b/gcc-4.9/gcc/config/i386/ia32intrin.h
index 5e7c893..614b0fa 100644
--- a/gcc-4.9/gcc/config/i386/ia32intrin.h
+++ b/gcc-4.9/gcc/config/i386/ia32intrin.h
@@ -256,11 +256,7 @@ __writeeflags (unsigned long long X)
#define _bswap64(a) __bswapq(a)
#define _popcnt64(a) __popcntq(a)
-#define _lrotl(a,b) __rolq((a), (b))
-#define _lrotr(a,b) __rorq((a), (b))
#else
-#define _lrotl(a,b) __rold((a), (b))
-#define _lrotr(a,b) __rord((a), (b))
/* Read flags register */
extern __inline unsigned int
@@ -280,6 +276,16 @@ __writeeflags (unsigned int X)
#endif
+/* On LP64 systems, longs are 64-bit. Use the appropriate rotate
+ * function. */
+#ifdef __LP64__
+#define _lrotl(a,b) __rolq((a), (b))
+#define _lrotr(a,b) __rorq((a), (b))
+#else
+#define _lrotl(a,b) __rold((a), (b))
+#define _lrotr(a,b) __rord((a), (b))
+#endif
+
#define _bit_scan_forward(a) __bsfd(a)
#define _bit_scan_reverse(a) __bsrd(a)
#define _bswap(a) __bswapd(a)
diff --git a/gcc-4.9/gcc/config/i386/sse.md b/gcc-4.9/gcc/config/i386/sse.md
index 27ade19..b60a822 100644
--- a/gcc-4.9/gcc/config/i386/sse.md
+++ b/gcc-4.9/gcc/config/i386/sse.md
@@ -5887,9 +5887,10 @@
(match_operand 5 "const_0_to_15_operand")]))
(match_operand:<ssequartermode> 6 "memory_operand" "0")
(match_operand:QI 7 "register_operand" "Yk")))]
- "TARGET_AVX512F && (INTVAL (operands[2]) = INTVAL (operands[3]) - 1)
- && (INTVAL (operands[3]) = INTVAL (operands[4]) - 1)
- && (INTVAL (operands[4]) = INTVAL (operands[5]) - 1)"
+ "TARGET_AVX512F
+ && (INTVAL (operands[2]) == (INTVAL (operands[3]) - 1)
+ && INTVAL (operands[3]) == (INTVAL (operands[4]) - 1)
+ && INTVAL (operands[4]) == (INTVAL (operands[5]) - 1))"
{
operands[2] = GEN_INT ((INTVAL (operands[2])) >> 2);
return "vextract<shuffletype>32x4\t{%2, %1, %0%{%7%}|%0%{%7%}, %1, %2}";
@@ -5909,9 +5910,10 @@
(match_operand 3 "const_0_to_15_operand")
(match_operand 4 "const_0_to_15_operand")
(match_operand 5 "const_0_to_15_operand")])))]
- "TARGET_AVX512F && (INTVAL (operands[2]) = INTVAL (operands[3]) - 1)
- && (INTVAL (operands[3]) = INTVAL (operands[4]) - 1)
- && (INTVAL (operands[4]) = INTVAL (operands[5]) - 1)"
+ "TARGET_AVX512F
+ && (INTVAL (operands[2]) == (INTVAL (operands[3]) - 1)
+ && INTVAL (operands[3]) == (INTVAL (operands[4]) - 1)
+ && INTVAL (operands[4]) == (INTVAL (operands[5]) - 1))"
{
operands[2] = GEN_INT ((INTVAL (operands[2])) >> 2);
return "vextract<shuffletype>32x4\t{%2, %1, %0<mask_operand6>|%0<mask_operand6>, %1, %2}";
diff --git a/gcc-4.9/gcc/config/rs6000/freebsd64.h b/gcc-4.9/gcc/config/rs6000/freebsd64.h
index 4f678f6..1f3ef19 100644
--- a/gcc-4.9/gcc/config/rs6000/freebsd64.h
+++ b/gcc-4.9/gcc/config/rs6000/freebsd64.h
@@ -367,7 +367,7 @@ extern int dot_symbols;
/* PowerPC64 Linux word-aligns FP doubles when -malign-power is given. */
#undef ADJUST_FIELD_ALIGN
#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
- ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
+ (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED)) \
? 128 \
: (TARGET_64BIT \
&& TARGET_ALIGN_NATURAL == 0 \
diff --git a/gcc-4.9/gcc/config/rs6000/linux64.h b/gcc-4.9/gcc/config/rs6000/linux64.h
index 52c233b..a198af1 100644
--- a/gcc-4.9/gcc/config/rs6000/linux64.h
+++ b/gcc-4.9/gcc/config/rs6000/linux64.h
@@ -246,7 +246,7 @@ extern int dot_symbols;
/* PowerPC64 Linux word-aligns FP doubles when -malign-power is given. */
#undef ADJUST_FIELD_ALIGN
#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
- ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
+ (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED)) \
? 128 \
: (TARGET_64BIT \
&& TARGET_ALIGN_NATURAL == 0 \
diff --git a/gcc-4.9/gcc/config/rs6000/rs6000-protos.h b/gcc-4.9/gcc/config/rs6000/rs6000-protos.h
index 785f6ce..067a74a 100644
--- a/gcc-4.9/gcc/config/rs6000/rs6000-protos.h
+++ b/gcc-4.9/gcc/config/rs6000/rs6000-protos.h
@@ -155,6 +155,7 @@ extern void rs6000_split_logical (rtx [], enum rtx_code, bool, bool, bool, rtx);
#ifdef TREE_CODE
extern unsigned int rs6000_data_alignment (tree, unsigned int, enum data_align);
+extern bool rs6000_special_adjust_field_align_p (tree, unsigned int);
extern unsigned int rs6000_special_round_type_align (tree, unsigned int,
unsigned int);
extern unsigned int darwin_rs6000_special_round_type_align (tree, unsigned int,
diff --git a/gcc-4.9/gcc/config/rs6000/rs6000.c b/gcc-4.9/gcc/config/rs6000/rs6000.c
index bf67e72..d7cbc6c 100644
--- a/gcc-4.9/gcc/config/rs6000/rs6000.c
+++ b/gcc-4.9/gcc/config/rs6000/rs6000.c
@@ -5871,6 +5871,34 @@ rs6000_data_alignment (tree type, unsigned int align, enum data_align how)
return align;
}
+/* Previous GCC releases forced all vector types to have 16-byte alignment. */
+
+bool
+rs6000_special_adjust_field_align_p (tree field, unsigned int computed)
+{
+ if (TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (field)) == VECTOR_TYPE)
+ {
+ if (computed != 128)
+ {
+ static bool warned;
+ if (!warned && warn_psabi)
+ {
+ warned = true;
+ inform (input_location,
+ "the layout of aggregates containing vectors with"
+ " %d-byte alignment will change in a future GCC release",
+ computed / BITS_PER_UNIT);
+ }
+ }
+ /* GCC 4.8/4.9 Note: To avoid any ABI change on a release branch, we
+ keep the special treatment of vector types, but warn if there will
+ be differences in future GCC releases. */
+ return true;
+ }
+
+ return false;
+}
+
/* AIX increases natural record alignment to doubleword if the first
field is an FP double while the FP fields remain word aligned. */
@@ -9180,14 +9208,51 @@ rs6000_function_arg_boundary (enum machine_mode mode, const_tree type)
|| (type && TREE_CODE (type) == VECTOR_TYPE
&& int_size_in_bytes (type) >= 16))
return 128;
- else if (((TARGET_MACHO && rs6000_darwin64_abi)
- || DEFAULT_ABI == ABI_ELFv2
- || (DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm))
- && mode == BLKmode
- && type && TYPE_ALIGN (type) > 64)
+
+ /* Aggregate types that need > 8 byte alignment are quadword-aligned
+ in the parameter area in the ELFv2 ABI, and in the AIX ABI unless
+ -mcompat-align-parm is used. */
+ if (((DEFAULT_ABI == ABI_AIX && !rs6000_compat_align_parm)
+ || DEFAULT_ABI == ABI_ELFv2)
+ && type && TYPE_ALIGN (type) > 64)
+ {
+ /* "Aggregate" means any AGGREGATE_TYPE except for single-element
+ or homogeneous float/vector aggregates here. We already handled
+ vector aggregates above, but still need to check for float here. */
+ bool aggregate_p = (AGGREGATE_TYPE_P (type)
+ && !SCALAR_FLOAT_MODE_P (elt_mode));
+
+ /* We used to check for BLKmode instead of the above aggregate type
+ check. Warn when this results in any difference to the ABI. */
+ if (aggregate_p != (mode == BLKmode))
+ {
+ static bool warned;
+ if (!warned && warn_psabi)
+ {
+ warned = true;
+ inform (input_location,
+ "the ABI of passing aggregates with %d-byte alignment"
+ " will change in a future GCC release",
+ (int) TYPE_ALIGN (type) / BITS_PER_UNIT);
+ }
+ }
+
+ /* GCC 4.8/4.9 Note: To avoid any ABI change on a release branch, we
+ keep using the BLKmode check, but warn if there will be differences
+ in future GCC releases. */
+ if (mode == BLKmode)
+ return 128;
+ }
+
+ /* Similar for the Darwin64 ABI. Note that for historical reasons we
+ implement the "aggregate type" check as a BLKmode check here; this
+ means certain aggregate types are in fact not aligned. */
+ if (TARGET_MACHO && rs6000_darwin64_abi
+ && mode == BLKmode
+ && type && TYPE_ALIGN (type) > 64)
return 128;
- else
- return PARM_BOUNDARY;
+
+ return PARM_BOUNDARY;
}
/* The offset in words to the start of the parameter save area. */
@@ -10225,6 +10290,7 @@ rs6000_function_arg (cumulative_args_t cum_v, enum machine_mode mode,
rtx r, off;
int i, k = 0;
unsigned long n_fpreg = (GET_MODE_SIZE (elt_mode) + 7) >> 3;
+ int fpr_words;
/* Do we also need to pass this argument in the parameter
save area? */
@@ -10253,6 +10319,37 @@ rs6000_function_arg (cumulative_args_t cum_v, enum machine_mode mode,
rvec[k++] = gen_rtx_EXPR_LIST (VOIDmode, r, off);
}
+ /* If there were not enough FPRs to hold the argument, the rest
+ usually goes into memory. However, if the current position
+ is still within the register parameter area, a portion may
+ actually have to go into GPRs.
+
+ Note that it may happen that the portion of the argument
+ passed in the first "half" of the first GPR was already
+ passed in the last FPR as well.
+
+ For unnamed arguments, we already set up GPRs to cover the
+ whole argument in rs6000_psave_function_arg, so there is
+ nothing further to do at this point.
+
+ GCC 4.8/4.9 Note: This was implemented incorrectly in earlier
+ GCC releases. To avoid any ABI change on the release branch,
+ we retain that original implementation here, but warn if we
+ encounter a case where the ABI will change in the future. */
+ fpr_words = (i * GET_MODE_SIZE (elt_mode)) / (TARGET_32BIT ? 4 : 8);
+ if (i < n_elts && align_words + fpr_words < GP_ARG_NUM_REG
+ && cum->nargs_prototype > 0)
+ {
+ static bool warned;
+ if (!warned && warn_psabi)
+ {
+ warned = true;
+ inform (input_location,
+ "the ABI of passing homogeneous float aggregates"
+ " will change in a future GCC release");
+ }
+ }
+
return rs6000_finish_function_arg (mode, rvec, k);
}
else if (align_words < GP_ARG_NUM_REG)
diff --git a/gcc-4.9/gcc/config/rs6000/sysv4.h b/gcc-4.9/gcc/config/rs6000/sysv4.h
index afbd289..7cc5433 100644
--- a/gcc-4.9/gcc/config/rs6000/sysv4.h
+++ b/gcc-4.9/gcc/config/rs6000/sysv4.h
@@ -292,7 +292,7 @@ do { \
/* An expression for the alignment of a structure field FIELD if the
alignment computed in the usual way is COMPUTED. */
#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
- ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
+ (rs6000_special_adjust_field_align_p ((FIELD), (COMPUTED)) \
? 128 : COMPUTED)
#undef BIGGEST_FIELD_ALIGNMENT
@@ -962,3 +962,19 @@ ncrtn.o%s"
#define TARGET_USES_SYSV4_OPT 1
#undef DBX_REGISTER_NUMBER
+
+/* Link -lasan early on the command line. For -static-libasan, don't link
+ it for -shared link, the executable should be compiled with -static-libasan
+ in that case, and for executable link link with --{,no-}whole-archive around
+ it to force everything into the executable. And similarly for -ltsan. */
+#if defined(HAVE_LD_STATIC_DYNAMIC)
+#undef LIBASAN_EARLY_SPEC
+#define LIBASAN_EARLY_SPEC "%{!shared:libasan_preinit%O%s} " \
+ "%{static-libasan:%{!shared:" \
+ LD_STATIC_OPTION " --whole-archive -lasan --no-whole-archive " \
+ LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}"
+#undef LIBTSAN_EARLY_SPEC
+#define LIBTSAN_EARLY_SPEC "%{static-libtsan:%{!shared:" \
+ LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \
+ LD_DYNAMIC_OPTION "}}%{!static-libtsan:-ltsan}"
+#endif
diff --git a/gcc-4.9/gcc/config/sh/predicates.md b/gcc-4.9/gcc/config/sh/predicates.md
index 31f2e1f..73bb880 100644
--- a/gcc-4.9/gcc/config/sh/predicates.md
+++ b/gcc-4.9/gcc/config/sh/predicates.md
@@ -489,6 +489,10 @@
rtx mem_rtx = MEM_P (op) ? op : SUBREG_REG (op);
rtx x = XEXP (mem_rtx, 0);
+ if (! ALLOW_INDEXED_ADDRESS
+ && GET_CODE (x) == PLUS && REG_P (XEXP (x, 0)) && REG_P (XEXP (x, 1)))
+ return false;
+
if ((mode == QImode || mode == HImode)
&& GET_CODE (x) == PLUS
&& REG_P (XEXP (x, 0))
@@ -567,6 +571,10 @@
rtx mem_rtx = MEM_P (op) ? op : SUBREG_REG (op);
rtx x = XEXP (mem_rtx, 0);
+ if (! ALLOW_INDEXED_ADDRESS
+ && GET_CODE (x) == PLUS && REG_P (XEXP (x, 0)) && REG_P (XEXP (x, 1)))
+ return false;
+
if ((mode == QImode || mode == HImode)
&& GET_CODE (x) == PLUS
&& REG_P (XEXP (x, 0))
diff --git a/gcc-4.9/gcc/config/sh/sh.c b/gcc-4.9/gcc/config/sh/sh.c
index 12724a2..62dcf0c 100644
--- a/gcc-4.9/gcc/config/sh/sh.c
+++ b/gcc-4.9/gcc/config/sh/sh.c
@@ -10207,6 +10207,10 @@ sh_legitimate_index_p (enum machine_mode mode, rtx op, bool consider_sh2a,
static bool
sh_legitimate_address_p (enum machine_mode mode, rtx x, bool strict)
{
+ if (! ALLOW_INDEXED_ADDRESS
+ && GET_CODE (x) == PLUS && REG_P (XEXP (x, 0)) && REG_P (XEXP (x, 1)))
+ return false;
+
if (REG_P (x) && REGNO (x) == GBR_REG)
return true;
@@ -10436,6 +10440,28 @@ sh_legitimize_reload_address (rtx *p, enum machine_mode mode, int opnum,
enum reload_type type = (enum reload_type) itype;
const int mode_sz = GET_MODE_SIZE (mode);
+ if (! ALLOW_INDEXED_ADDRESS
+ && GET_CODE (*p) == PLUS
+ && REG_P (XEXP (*p, 0)) && REG_P (XEXP (*p, 1)))
+ {
+ *p = copy_rtx (*p);
+ push_reload (*p, NULL_RTX, p, NULL,
+ BASE_REG_CLASS, Pmode, VOIDmode, 0, 0, opnum, type);
+ return true;
+ }
+
+ if (! ALLOW_INDEXED_ADDRESS
+ && GET_CODE (*p) == PLUS
+ && GET_CODE (XEXP (*p, 0)) == PLUS)
+ {
+ rtx sum = gen_rtx_PLUS (Pmode, XEXP (XEXP (*p, 0), 0),
+ XEXP (XEXP (*p, 0), 1));
+ *p = gen_rtx_PLUS (Pmode, sum, XEXP (*p, 1));
+ push_reload (sum, NULL_RTX, &XEXP (*p, 0), NULL,
+ BASE_REG_CLASS, Pmode, VOIDmode, 0, 0, opnum, type);
+ return true;
+ }
+
if (TARGET_SHMEDIA)
return false;
diff --git a/gcc-4.9/gcc/config/sparc/sync.md b/gcc-4.9/gcc/config/sparc/sync.md
index e6e237f..98ac0d3 100644
--- a/gcc-4.9/gcc/config/sparc/sync.md
+++ b/gcc-4.9/gcc/config/sparc/sync.md
@@ -64,11 +64,19 @@
"stbar"
[(set_attr "type" "multi")])
+;; For LEON3, STB has the effect of membar #StoreLoad.
+(define_insn "*membar_storeload_leon3"
+ [(set (match_operand:BLK 0 "" "")
+ (unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))]
+ "TARGET_LEON3"
+ "stb\t%%g0, [%%sp-1]"
+ [(set_attr "type" "store")])
+
;; For V8, LDSTUB has the effect of membar #StoreLoad.
(define_insn "*membar_storeload"
[(set (match_operand:BLK 0 "" "")
(unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))]
- "TARGET_V8"
+ "TARGET_V8 && !TARGET_LEON3"
"ldstub\t[%%sp-1], %%g0"
[(set_attr "type" "multi")])
diff --git a/gcc-4.9/gcc/coverage.c b/gcc-4.9/gcc/coverage.c
index a7f183d..6b1d0d6 100644
--- a/gcc-4.9/gcc/coverage.c
+++ b/gcc-4.9/gcc/coverage.c
@@ -720,7 +720,18 @@ read_counts_file (const char *da_file_name, unsigned module_id)
return;
}
else
- return;
+ {
+ inform (input_location, "file %s not found, disabling profile use",
+ da_file_name);
+ set_profile_use_options (&global_options, &global_options_set,
+ false, true);
+ /* RESET is invoked during covrerage_init when process_options is done.
+ Need to reset optimization_default_node and optimization_current_node. */
+ /* Save the current optimization options. */
+ optimization_default_node = build_optimization_node (&global_options);
+ optimization_current_node = optimization_default_node;
+ return;
+ }
}
if (!gcov_magic (gcov_read_unsigned (), GCOV_DATA_MAGIC))
@@ -1023,7 +1034,10 @@ get_coverage_counts_entry (struct function *func, unsigned counter)
if (PARAM_VALUE (PARAM_PROFILE_FUNC_INTERNAL_ID))
elt.ident = FUNC_DECL_GLOBAL_ID (func);
else
- elt.ident = coverage_compute_profile_id (cgraph_get_node (func->decl));
+ {
+ gcc_assert (coverage_node_map_initialized_p ());
+ elt.ident = cgraph_get_node (func->decl)->profile_id;
+ }
elt.ctr = counter;
entry = counts_hash.find (&elt);
@@ -1131,7 +1145,10 @@ get_coverage_counts_no_warn (struct function *f, unsigned counter, unsigned *n_c
if (PARAM_VALUE (PARAM_PROFILE_FUNC_INTERNAL_ID))
elt.ident = FUNC_DECL_GLOBAL_ID (f);
else
- elt.ident = coverage_compute_profile_id (cgraph_get_node (f->decl));
+ {
+ gcc_assert (coverage_node_map_initialized_p ());
+ elt.ident = cgraph_get_node (f->decl)->profile_id;
+ }
elt.ctr = counter;
entry = counts_hash.find (&elt);
if (!entry)
@@ -1325,8 +1342,15 @@ coverage_compute_lineno_checksum (void)
/* Note: it is a bad design that C++ FE associate the convertion function type
with the name of the decl. This leads to cross contamination between different
conversion operators in different modules (If conv_type_names map is cleared
- at the end of parsing of each module). */
- if (flag_dyn_ipa && lang_hooks.user_conv_function_p (current_function_decl))
+ at the end of parsing of each module).
+
+ For LIPO always use the full mangled name to help disambiguate different
+ template instantiations. This is important for LIPO because we use the
+ checksums to identify matching copies of the same COMDAT to handle
+ missing profiles in the copies not selected by the linker, and to update
+ indirect call profiles when the target COMDAT is a copy that is not
+ in the module group. */
+ if (flag_dyn_ipa)
name = DECL_ASSEMBLER_NAME (current_function_decl);
else
name = DECL_NAME (current_function_decl);
@@ -1411,8 +1435,11 @@ coverage_begin_function (unsigned lineno_checksum, unsigned cfg_checksum)
if (PARAM_VALUE (PARAM_PROFILE_FUNC_INTERNAL_ID))
gcov_write_unsigned (FUNC_DECL_FUNC_ID (cfun));
else
- gcov_write_unsigned (coverage_compute_profile_id (
- cgraph_get_node (cfun->decl)));
+ {
+ gcc_assert (coverage_node_map_initialized_p ());
+ gcov_write_unsigned (
+ cgraph_get_node (current_function_decl)->profile_id);
+ }
gcov_write_unsigned (lineno_checksum);
gcov_write_unsigned (cfg_checksum);
@@ -1458,8 +1485,9 @@ coverage_end_function (unsigned lineno_checksum, unsigned cfg_checksum)
if (flag_dyn_ipa)
error ("param=profile-func-internal-id=0 is not"
" supported in LIPO mode. ");
- item->ident = coverage_compute_profile_id (
- cgraph_get_node (cfun->decl));
+ gcc_assert (coverage_node_map_initialized_p ());
+ item->ident = cgraph_get_node (cfun->decl)->profile_id;
+
}
item->lineno_checksum = lineno_checksum;
item->cfg_checksum = cfg_checksum;
diff --git a/gcc-4.9/gcc/coverage.h b/gcc-4.9/gcc/coverage.h
index 408cd66..0049d13 100644
--- a/gcc-4.9/gcc/coverage.h
+++ b/gcc-4.9/gcc/coverage.h
@@ -75,6 +75,8 @@ extern void coverage_dc_end_function (void);
is present in the coverage internal data structures. */
extern bool coverage_function_present (unsigned fn_ident);
+extern bool coverage_node_map_initialized_p (void);
+
extern void emit_function_name (void);
extern tree get_gcov_type (void);
diff --git a/gcc-4.9/gcc/cp/ChangeLog b/gcc-4.9/gcc/cp/ChangeLog
index f406b27..b0a474d 100644
--- a/gcc-4.9/gcc/cp/ChangeLog
+++ b/gcc-4.9/gcc/cp/ChangeLog
@@ -1,3 +1,12 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
+2014-07-13 Jason Merrill <jason@redhat.com>
+
+ PR c++/58636
+ * call.c (build_list_conv): Don't try to build a list of references.
+
2014-07-10 Jason Merrill <jason@redhat.com>
PR c++/61661
diff --git a/gcc-4.9/gcc/cp/call.c b/gcc-4.9/gcc/cp/call.c
index 2f24fd4..2c67c03 100644
--- a/gcc-4.9/gcc/cp/call.c
+++ b/gcc-4.9/gcc/cp/call.c
@@ -805,6 +805,12 @@ build_list_conv (tree type, tree ctor, int flags, tsubst_flags_t complain)
/* But no narrowing conversions. */
flags |= LOOKUP_NO_NARROWING;
+ /* Can't make an array of these types. */
+ if (TREE_CODE (elttype) == REFERENCE_TYPE
+ || TREE_CODE (elttype) == FUNCTION_TYPE
+ || VOID_TYPE_P (elttype))
+ return NULL;
+
FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (ctor), i, val)
{
conversion *sub
diff --git a/gcc-4.9/gcc/cp/except.c b/gcc-4.9/gcc/cp/except.c
index 221971a..3a66c67 100644
--- a/gcc-4.9/gcc/cp/except.c
+++ b/gcc-4.9/gcc/cp/except.c
@@ -1269,6 +1269,8 @@ bool
nothrow_spec_p (const_tree spec)
{
gcc_assert (!DEFERRED_NOEXCEPT_SPEC_P (spec));
+ if (spec == NULL_TREE && flag_default_noexcept)
+ return true;
if (spec == NULL_TREE
|| TREE_VALUE (spec) != NULL_TREE
|| spec == noexcept_false_spec)
@@ -1290,7 +1292,7 @@ type_noexcept_p (const_tree type)
{
tree spec = TYPE_RAISES_EXCEPTIONS (type);
gcc_assert (!DEFERRED_NOEXCEPT_SPEC_P (spec));
- if (flag_nothrow_opt)
+ if (flag_nothrow_opt || flag_default_noexcept)
return nothrow_spec_p (spec);
else
return spec == noexcept_true_spec;
diff --git a/gcc-4.9/gcc/expr.c b/gcc-4.9/gcc/expr.c
index 94e9017..ad8c05a 100644
--- a/gcc-4.9/gcc/expr.c
+++ b/gcc-4.9/gcc/expr.c
@@ -6605,7 +6605,7 @@ store_field (rtx target, HOST_WIDE_INT bitsize, HOST_WIDE_INT bitpos,
{
HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (exp));
rtx temp_target;
- if (mode == BLKmode)
+ if (mode == BLKmode || mode == VOIDmode)
mode = smallest_mode_for_size (size * BITS_PER_UNIT, MODE_INT);
temp_target = gen_reg_rtx (mode);
emit_group_store (temp_target, temp, TREE_TYPE (exp), size);
diff --git a/gcc-4.9/gcc/fortran/ChangeLog b/gcc-4.9/gcc/fortran/ChangeLog
index b96c612..d2e070b 100644
--- a/gcc-4.9/gcc/fortran/ChangeLog
+++ b/gcc-4.9/gcc/fortran/ChangeLog
@@ -1,3 +1,15 @@
+2014-07-19 Paul Thomas <pault@gcc.gnu.org>
+
+ Backport from mainline
+ PR fortran/61780
+ * dependency.c (gfc_dep_resolver): Index the 'reverse' array so
+ that elements are skipped. This then correctly aligns 'reverse'
+ with the scalarizer loops.
+
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-07-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/61459
diff --git a/gcc-4.9/gcc/fortran/dependency.c b/gcc-4.9/gcc/fortran/dependency.c
index a24a470..f9b975a 100644
--- a/gcc-4.9/gcc/fortran/dependency.c
+++ b/gcc-4.9/gcc/fortran/dependency.c
@@ -2023,6 +2023,7 @@ int
gfc_dep_resolver (gfc_ref *lref, gfc_ref *rref, gfc_reverse *reverse)
{
int n;
+ int m;
gfc_dependency fin_dep;
gfc_dependency this_dep;
@@ -2072,6 +2073,8 @@ gfc_dep_resolver (gfc_ref *lref, gfc_ref *rref, gfc_reverse *reverse)
break;
}
+ /* Index for the reverse array. */
+ m = -1;
for (n=0; n < lref->u.ar.dimen; n++)
{
/* Handle dependency when either of array reference is vector
@@ -2118,38 +2121,44 @@ gfc_dep_resolver (gfc_ref *lref, gfc_ref *rref, gfc_reverse *reverse)
The ability to reverse or not is set by previous conditions
in this dimension. If reversal is not activated, the
value GFC_DEP_BACKWARD is reset to GFC_DEP_OVERLAP. */
+
+ /* Get the indexing right for the scalarizing loop. If this
+ is an element, there is no corresponding loop. */
+ if (lref->u.ar.dimen_type[n] != DIMEN_ELEMENT)
+ m++;
+
if (rref->u.ar.dimen_type[n] == DIMEN_RANGE
&& lref->u.ar.dimen_type[n] == DIMEN_RANGE)
{
/* Set reverse if backward dependence and not inhibited. */
- if (reverse && reverse[n] == GFC_ENABLE_REVERSE)
- reverse[n] = (this_dep == GFC_DEP_BACKWARD) ?
- GFC_REVERSE_SET : reverse[n];
+ if (reverse && reverse[m] == GFC_ENABLE_REVERSE)
+ reverse[m] = (this_dep == GFC_DEP_BACKWARD) ?
+ GFC_REVERSE_SET : reverse[m];
/* Set forward if forward dependence and not inhibited. */
- if (reverse && reverse[n] == GFC_ENABLE_REVERSE)
- reverse[n] = (this_dep == GFC_DEP_FORWARD) ?
- GFC_FORWARD_SET : reverse[n];
+ if (reverse && reverse[m] == GFC_ENABLE_REVERSE)
+ reverse[m] = (this_dep == GFC_DEP_FORWARD) ?
+ GFC_FORWARD_SET : reverse[m];
/* Flag up overlap if dependence not compatible with
the overall state of the expression. */
- if (reverse && reverse[n] == GFC_REVERSE_SET
+ if (reverse && reverse[m] == GFC_REVERSE_SET
&& this_dep == GFC_DEP_FORWARD)
{
- reverse[n] = GFC_INHIBIT_REVERSE;
+ reverse[m] = GFC_INHIBIT_REVERSE;
this_dep = GFC_DEP_OVERLAP;
}
- else if (reverse && reverse[n] == GFC_FORWARD_SET
+ else if (reverse && reverse[m] == GFC_FORWARD_SET
&& this_dep == GFC_DEP_BACKWARD)
{
- reverse[n] = GFC_INHIBIT_REVERSE;
+ reverse[m] = GFC_INHIBIT_REVERSE;
this_dep = GFC_DEP_OVERLAP;
}
/* If no intention of reversing or reversing is explicitly
inhibited, convert backward dependence to overlap. */
if ((reverse == NULL && this_dep == GFC_DEP_BACKWARD)
- || (reverse != NULL && reverse[n] == GFC_INHIBIT_REVERSE))
+ || (reverse != NULL && reverse[m] == GFC_INHIBIT_REVERSE))
this_dep = GFC_DEP_OVERLAP;
}
diff --git a/gcc-4.9/gcc/gcc.c b/gcc-4.9/gcc/gcc.c
index efca49b..297d985 100644
--- a/gcc-4.9/gcc/gcc.c
+++ b/gcc-4.9/gcc/gcc.c
@@ -772,7 +772,8 @@ proper position among the other output files. */
%{fcilkplus:%:include(libcilkrts.spec)%(link_cilkrts)}\
%{fgnu-tm:%:include(libitm.spec)%(link_itm)}\
%(mflib) " STACK_SPLIT_SPEC "\
- %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \
+ %{fprofile-arcs|fprofile-generate*|coverage:-lgcov " \
+ LINUX_OR_ANDROID_LD("", "-lgcc") "}" SANITIZER_SPEC " \
%{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\
%{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}"
#endif
diff --git a/gcc-4.9/gcc/gcov-tool.c b/gcc-4.9/gcc/gcov-tool.c
index f15e6f3..e7b551e 100644
--- a/gcc-4.9/gcc/gcov-tool.c
+++ b/gcc-4.9/gcc/gcov-tool.c
@@ -61,17 +61,22 @@ extern void lipo_set_substitute_string (const char *);
-- otherwise we get duplicated defintions.
Make the defines weak to link with other objects/libraries
that potentially compiled with -fprofile-generate. */
+#if !defined(_WIN32)
+#define WEAK_ATTR __attribute__ ((weak))
+#else
+#define WEAK_ATTR
+#endif
-__attribute__ ((weak)) gcov_unsigned_t __gcov_lipo_grouping_algorithm;
-__attribute__ ((weak)) gcov_unsigned_t __gcov_lipo_merge_modu_edges;
-__attribute__ ((weak)) gcov_unsigned_t __gcov_lipo_weak_inclusion;
-__attribute__ ((weak)) gcov_unsigned_t __gcov_lipo_max_mem;
-__attribute__ ((weak)) gcov_unsigned_t __gcov_lipo_comdat_algorithm;
-__attribute__ ((weak)) gcov_unsigned_t __gcov_lipo_random_group_size;
-__attribute__ ((weak)) gcov_unsigned_t __gcov_lipo_cutoff;
-__attribute__ ((weak)) gcov_unsigned_t __gcov_lipo_random_seed;
-__attribute__ ((weak)) gcov_unsigned_t __gcov_lipo_dump_cgraph;
-__attribute__ ((weak)) gcov_unsigned_t __gcov_lipo_propagate_scale;
+WEAK_ATTR gcov_unsigned_t __gcov_lipo_grouping_algorithm;
+WEAK_ATTR gcov_unsigned_t __gcov_lipo_merge_modu_edges;
+WEAK_ATTR gcov_unsigned_t __gcov_lipo_weak_inclusion;
+WEAK_ATTR gcov_unsigned_t __gcov_lipo_max_mem;
+WEAK_ATTR gcov_unsigned_t __gcov_lipo_comdat_algorithm;
+WEAK_ATTR gcov_unsigned_t __gcov_lipo_random_group_size;
+WEAK_ATTR gcov_unsigned_t __gcov_lipo_cutoff;
+WEAK_ATTR gcov_unsigned_t __gcov_lipo_random_seed;
+WEAK_ATTR gcov_unsigned_t __gcov_lipo_dump_cgraph;
+WEAK_ATTR gcov_unsigned_t __gcov_lipo_propagate_scale;
#else
gcov_unsigned_t __gcov_lipo_grouping_algorithm;
gcov_unsigned_t __gcov_lipo_merge_modu_edges;
@@ -85,6 +90,8 @@ gcov_unsigned_t __gcov_lipo_dump_cgraph;
gcov_unsigned_t __gcov_lipo_propagate_scale;
#endif
+#undef WEAK_ATTR
+
/* Set to verbose output mode. */
static bool verbose;
diff --git a/gcc-4.9/gcc/go/ChangeLog b/gcc-4.9/gcc/go/ChangeLog
index 1c1505a..1af11e4 100644
--- a/gcc-4.9/gcc/go/ChangeLog
+++ b/gcc-4.9/gcc/go/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-04-22 Release Manager
* GCC 4.9.0 released.
diff --git a/gcc-4.9/gcc/ipa-inline-transform.c b/gcc-4.9/gcc/ipa-inline-transform.c
index aaf427d..69598b3 100644
--- a/gcc-4.9/gcc/ipa-inline-transform.c
+++ b/gcc-4.9/gcc/ipa-inline-transform.c
@@ -186,8 +186,14 @@ clone_inlined_nodes (struct cgraph_edge *e, bool duplicate,
else
{
struct cgraph_node *n;
- if (flag_auto_profile && L_IPO_COMP_MODE
- && cgraph_pre_profiling_inlining_done)
+ /* Disable updating of callee count if caller is not the resolved node
+ to avoid multiple updates of the callee's profile when inlining
+ into COMDAT copies. Both AutoFDO and regular FDO will have the
+ same edge counts for all unresolved nodes. In AutoFDO this is due
+ to profile correlation by function name and source position. In
+ regular FDO this is due to COMDAT profile merging performed on the
+ dynamic callgraph at the end of LIPO profiling. */
+ if (L_IPO_COMP_MODE && cgraph_pre_profiling_inlining_done)
{
struct cgraph_node *caller = e->caller;
if (caller->global.inlined_to)
diff --git a/gcc-4.9/gcc/java/ChangeLog b/gcc-4.9/gcc/java/ChangeLog
index c806f62..b9185f1 100644
--- a/gcc-4.9/gcc/java/ChangeLog
+++ b/gcc-4.9/gcc/java/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-04-22 Release Manager
* GCC 4.9.0 released.
diff --git a/gcc-4.9/gcc/l-ipo.c b/gcc-4.9/gcc/l-ipo.c
index 843ad55..59a9636 100644
--- a/gcc-4.9/gcc/l-ipo.c
+++ b/gcc-4.9/gcc/l-ipo.c
@@ -1566,7 +1566,11 @@ resolve_cgraph_node (struct cgraph_sym **slot, struct cgraph_node *node)
}
has_prof1 = has_profile_info (decl1);
- if (has_prof1)
+ bool is_aux1 = cgraph_is_auxiliary (decl1);
+ bool is_aux2 = cgraph_is_auxiliary (decl2);
+ /* Pick the copy from the primary module if multiple copies
+ have profile. */
+ if (has_prof1 && (!is_aux1 || is_aux2))
return;
has_prof2 = has_profile_info (decl2);
if (has_prof2)
diff --git a/gcc-4.9/gcc/lto/ChangeLog b/gcc-4.9/gcc/lto/ChangeLog
index 47a5924..c029da6 100644
--- a/gcc-4.9/gcc/lto/ChangeLog
+++ b/gcc-4.9/gcc/lto/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-04-22 Jan Hubicka <hubicka@ucw.cz>
PR lto/61012
diff --git a/gcc-4.9/gcc/objc/ChangeLog b/gcc-4.9/gcc/objc/ChangeLog
index de619ae..2443c61 100644
--- a/gcc-4.9/gcc/objc/ChangeLog
+++ b/gcc-4.9/gcc/objc/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-04-22 Release Manager
* GCC 4.9.0 released.
diff --git a/gcc-4.9/gcc/objcp/ChangeLog b/gcc-4.9/gcc/objcp/ChangeLog
index 19f43bc..cba09a4 100644
--- a/gcc-4.9/gcc/objcp/ChangeLog
+++ b/gcc-4.9/gcc/objcp/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-04-22 Release Manager
* GCC 4.9.0 released.
diff --git a/gcc-4.9/gcc/omp-low.c b/gcc-4.9/gcc/omp-low.c
index a605c45..1753cad 100644
--- a/gcc-4.9/gcc/omp-low.c
+++ b/gcc-4.9/gcc/omp-low.c
@@ -1872,7 +1872,6 @@ create_omp_child_function (omp_context *ctx, bool task_copy)
TREE_STATIC (decl) = 1;
TREE_USED (decl) = 1;
DECL_ARTIFICIAL (decl) = 1;
- DECL_NAMELESS (decl) = 1;
DECL_IGNORED_P (decl) = 0;
TREE_PUBLIC (decl) = 0;
DECL_UNINLINABLE (decl) = 1;
diff --git a/gcc-4.9/gcc/opts.c b/gcc-4.9/gcc/opts.c
index 3ed603a..a588d2e 100644
--- a/gcc-4.9/gcc/opts.c
+++ b/gcc-4.9/gcc/opts.c
@@ -1288,6 +1288,75 @@ print_specific_help (unsigned int include_flags,
opts->x_help_columns, opts, lang_mask);
}
+/* Set options implied by -f[no-]profile-use[=...]. If RESET is
+ true, it means the profile data is not available, so it is better
+ to turn off the options unless explicitly set. The default
+ values are not checked. */
+
+void
+set_profile_use_options (struct gcc_options *opts,
+ struct gcc_options *opts_set,
+ bool value, bool reset)
+{
+ if (reset)
+ {
+ opts->x_flag_profile_use = false;
+ maybe_set_param_value
+ (PARAM_MAX_INLINE_INSNS_SINGLE,
+ default_param_value (PARAM_MAX_INLINE_INSNS_SINGLE),
+ opts->x_param_values, opts_set->x_param_values);
+ maybe_set_param_value
+ (PARAM_MAX_INLINE_INSNS_AUTO,
+ default_param_value (PARAM_MAX_INLINE_INSNS_AUTO),
+ opts->x_param_values, opts_set->x_param_values);
+ }
+
+ if (!opts_set->x_flag_branch_probabilities || reset)
+ opts->x_flag_branch_probabilities = value;
+ if (!opts_set->x_flag_profile_values || reset)
+ opts->x_flag_profile_values = value;
+ if (!opts_set->x_flag_unroll_loops)
+ opts->x_flag_unroll_loops = value;
+ if (!opts_set->x_flag_peel_loops)
+ opts->x_flag_peel_loops = value;
+ if (!opts_set->x_flag_value_profile_transformations || reset)
+ opts->x_flag_value_profile_transformations = value;
+ if (!opts_set->x_flag_inline_functions)
+ opts->x_flag_inline_functions = value;
+ if (!opts_set->x_flag_ipa_cp)
+ opts->x_flag_ipa_cp = value;
+ if (!opts_set->x_flag_ipa_cp_clone
+ && value && opts->x_flag_ipa_cp || reset)
+ opts->x_flag_ipa_cp_clone = value;
+ if (!opts_set->x_flag_predictive_commoning)
+ opts->x_flag_predictive_commoning = value;
+ if (!opts_set->x_flag_unswitch_loops)
+ opts->x_flag_unswitch_loops = value;
+ if (!opts_set->x_flag_gcse_after_reload)
+ opts->x_flag_gcse_after_reload = value;
+ if (!opts_set->x_flag_tree_loop_vectorize
+ && !opts_set->x_flag_tree_vectorize)
+ opts->x_flag_tree_loop_vectorize = value;
+ if (!opts_set->x_flag_tree_loop_distribute_patterns)
+ opts->x_flag_tree_loop_distribute_patterns = value;
+ if (!opts_set->x_flag_profile_reorder_functions || reset)
+ opts->x_flag_profile_reorder_functions = value;
+ /* Indirect call profiling should do all useful transformations
+ speculative devirtualization does. */
+ if (!opts_set->x_flag_devirtualize_speculatively
+ && opts->x_flag_value_profile_transformations)
+ opts->x_flag_devirtualize_speculatively = false;
+
+ /* See how AUTODECT flag_web is set in toplev.c. */
+ if (reset && !opts->x_flag_unroll_loops
+ && !opts->x_flag_peel_loops)
+ {
+ if(!opts_set->x_flag_web)
+ opts->x_flag_web = false;
+ if (!opts_set->x_flag_rename_registers)
+ opts->x_flag_rename_registers = false;
+ }
+}
/* Handle target- and language-independent options. Return zero to
generate an "unknown option" message. Only options that need
@@ -1735,41 +1804,7 @@ common_handle_option (struct gcc_options *opts,
value = true;
/* No break here - do -fprofile-use processing. */
case OPT_fprofile_use:
- if (!opts_set->x_flag_branch_probabilities)
- opts->x_flag_branch_probabilities = value;
- if (!opts_set->x_flag_profile_values)
- opts->x_flag_profile_values = value;
- if (!opts_set->x_flag_unroll_loops)
- opts->x_flag_unroll_loops = value;
- if (!opts_set->x_flag_peel_loops)
- opts->x_flag_peel_loops = value;
- if (!opts_set->x_flag_value_profile_transformations)
- opts->x_flag_value_profile_transformations = value;
- if (!opts_set->x_flag_inline_functions)
- opts->x_flag_inline_functions = value;
- if (!opts_set->x_flag_ipa_cp)
- opts->x_flag_ipa_cp = value;
- if (!opts_set->x_flag_ipa_cp_clone
- && value && opts->x_flag_ipa_cp)
- opts->x_flag_ipa_cp_clone = value;
- if (!opts_set->x_flag_predictive_commoning)
- opts->x_flag_predictive_commoning = value;
- if (!opts_set->x_flag_unswitch_loops)
- opts->x_flag_unswitch_loops = value;
- if (!opts_set->x_flag_gcse_after_reload)
- opts->x_flag_gcse_after_reload = value;
- if (!opts_set->x_flag_tree_loop_vectorize
- && !opts_set->x_flag_tree_vectorize)
- opts->x_flag_tree_loop_vectorize = value;
- if (!opts_set->x_flag_tree_loop_distribute_patterns)
- opts->x_flag_tree_loop_distribute_patterns = value;
- if (!opts_set->x_flag_profile_reorder_functions)
- opts->x_flag_profile_reorder_functions = value;
- /* Indirect call profiling should do all useful transformations
- speculative devirtualization does. */
- if (!opts_set->x_flag_devirtualize_speculatively
- && opts->x_flag_value_profile_transformations)
- opts->x_flag_devirtualize_speculatively = false;
+ set_profile_use_options (opts, opts_set, value, false);
break;
case OPT_fauto_profile_:
diff --git a/gcc-4.9/gcc/opts.h b/gcc-4.9/gcc/opts.h
index 3f07ec2..74e7622 100644
--- a/gcc-4.9/gcc/opts.h
+++ b/gcc-4.9/gcc/opts.h
@@ -417,4 +417,6 @@ extern bool opt_enum_arg_to_value (size_t opt_index, const char *arg,
int *value, unsigned int lang_mask);
extern void write_compilation_info_to_asm (void);
extern void write_compilation_flags_to_asm (void);
+extern void set_profile_use_options (struct gcc_options *,
+ struct gcc_options *, bool, bool);
#endif
diff --git a/gcc-4.9/gcc/params.c b/gcc-4.9/gcc/params.c
index ab3c7c7..03b769c 100644
--- a/gcc-4.9/gcc/params.c
+++ b/gcc-4.9/gcc/params.c
@@ -190,3 +190,18 @@ get_num_compiler_params (void)
{
return num_compiler_params;
}
+
+/* Dump values of parameters. */
+
+void
+dump_params (int *params, int *params_set)
+{
+ size_t i;
+
+ /* Scan the parameter table to find a matching entry. */
+ for (i = 0; i < num_compiler_params; ++i)
+ {
+ fprintf (stderr, "%s\t%d (%s)\n", compiler_params[i].option,
+ params[i], params_set[i] ? "explicit" : "implicit");
+ }
+}
diff --git a/gcc-4.9/gcc/params.def b/gcc-4.9/gcc/params.def
index fd38e8f..f596569 100644
--- a/gcc-4.9/gcc/params.def
+++ b/gcc-4.9/gcc/params.def
@@ -1071,6 +1071,17 @@ DEFPARAM (PARAM_LIPO_WEAK_INCLUSION,
"Default is 0.",
0, 0, 1)
+/* Choose different COMDAT profile fixup algorithm. This only affects
+ LIPO profile-gen. */
+DEFPARAM (PARAM_LIPO_COMDAT_ALGORITHM,
+ "lipo-comdat-algorithm",
+ "Algorithm 0 performs no fixup."
+ "Algorithm 1 fixes up only indirect call profile targets."
+ "Algorithm 2 fixes up only missing counters."
+ "Algorithm 3 (1|2) fixes up both."
+ "The default algorithm is 3.",
+ 3, 0, 3)
+
/* In LIPO profile-use, use this parameter to enable the dumping of module id
in inline message. */
DEFPARAM (PARAM_INLINE_DUMP_MODULE_ID,
diff --git a/gcc-4.9/gcc/params.h b/gcc-4.9/gcc/params.h
index 0d6daa2..b1bac40 100644
--- a/gcc-4.9/gcc/params.h
+++ b/gcc-4.9/gcc/params.h
@@ -92,6 +92,8 @@ enum compiler_param
#define PARAM_VALUE(ENUM) \
((int) global_options.x_param_values[(int) ENUM])
+extern void dump_params (int *params, int *params_set);
+
/* Set the value of the parameter given by NUM to VALUE, implicitly,
if it has not been set explicitly by the user, in the table PARAMS
using PARAMS_SET to indicate which have been explicitly set. */
diff --git a/gcc-4.9/gcc/po/ChangeLog b/gcc-4.9/gcc/po/ChangeLog
index 631f64a..399d6b5 100644
--- a/gcc-4.9/gcc/po/ChangeLog
+++ b/gcc-4.9/gcc/po/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-05-14 Joseph Myers <joseph@codesourcery.com>
* zh_CN.po: Update.
diff --git a/gcc-4.9/gcc/sched-deps.c b/gcc-4.9/gcc/sched-deps.c
index efc4223..df29bd3 100644
--- a/gcc-4.9/gcc/sched-deps.c
+++ b/gcc-4.9/gcc/sched-deps.c
@@ -2750,7 +2750,8 @@ sched_analyze_2 (struct deps_desc *deps, rtx x, rtx insn)
Consider for instance a volatile asm that changes the fpu rounding
mode. An insn should not be moved across this even if it only uses
pseudo-regs because it might give an incorrectly rounded result. */
- if (code != ASM_OPERANDS || MEM_VOLATILE_P (x))
+ if ((code != ASM_OPERANDS || MEM_VOLATILE_P (x))
+ && !DEBUG_INSN_P (insn))
reg_pending_barrier = TRUE_BARRIER;
/* For all ASM_OPERANDS, we must traverse the vector of input operands.
diff --git a/gcc-4.9/gcc/testsuite/ChangeLog b/gcc-4.9/gcc/testsuite/ChangeLog
index 20212cd..7903199 100644
--- a/gcc-4.9/gcc/testsuite/ChangeLog
+++ b/gcc-4.9/gcc/testsuite/ChangeLog
@@ -1,3 +1,108 @@
+2014-07-28 Richard Biener <rguenther@suse.de>
+
+ PR rtl-optimization/61801
+ * gcc.target/i386/pr61801.c: Fix testcase.
+
+2014-07-28 Richard Biener <rguenther@suse.de>
+
+ PR rtl-optimization/61801
+ * gcc.target/i386/pr61801.c: New testcase.
+
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ Backport from mainline
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * gcc.target/powerpc/ppc64-abi-warn-3.c: New test.
+
+ * gcc.c-torture/execute/20050316-1.x: Add -Wno-psabi.
+ * gcc.c-torture/execute/20050604-1.x: Add -Wno-psabi.
+ * gcc.c-torture/execute/20050316-3.x: New file. Add -Wno-psabi.
+ * gcc.c-torture/execute/pr23135.x: Likewise.
+
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ Backport from mainline
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * gcc.target/powerpc/ppc64-abi-warn-2.c: New test.
+
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ Backport from mainline
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * gcc.target/powerpc/ppc64-abi-warn-1.c: New test.
+
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ Backport from mainline
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * g++.dg/compat/struct-layout-1.exp: Load g++-dg.exp.
+
+2014-07-24 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/61160
+ * g++.dg/ipa/pr61160-2.C (main): Return zero.
+ * g++.dg/ipa/pr61160-3.C (main): Likewise.
+
+2014-07-21 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2014-07-21 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/61855
+ * gcc.target/i386/pr61855.c: New test.
+
+2014-07-20 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/pack20.ad[sb]: New test.
+ * gnat.dg/pack20_pkg.ads: New helper.
+
+2014-07-19 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/stack-usage-2.c: Adjust.
+
+2014-07-19 Paul Thomas <pault@gcc.gnu.org>
+
+ Backport from mainline
+ PR fortran/61780
+ * gfortran.dg/dependency_44.f90 : New test
+
+2014-07-18 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2014-07-18 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/61794
+ * gcc.target/i386/pr61794.c: New test.
+
+2014-07-17 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2014-07-10 Richard Biener <rguenther@suse.de>
+
+ PR c-family/61741
+ * c-c++-common/torture/pr61741.c: Use signed char.
+
+ 2014-07-09 Richard Biener <rguenther@suse.de>
+
+ PR c-family/61741
+ * c-c++-common/torture/pr61741.c: New testcase.
+
+2014-07-17 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2014-07-14 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/61779
+ * gcc.dg/tree-ssa/ssa-copyprop-2.c: New testcase.
+
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-07-10 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/opt39.adb: New test.
@@ -13,7 +118,8 @@
2014-06-09 Alan Lawrence <alan.lawrence@arm.com>
PR target/61062
- * gcc.target/arm/pr48252.c (main): Expect same result as endian-neutral.
+ * gcc.target/arm/pr48252.c (main): Expect same result as
+ endian-neutral.
2014-07-08 Jakub Jelinek <jakub@redhat.com>
@@ -30,8 +136,8 @@
2014-07-08 Alan Lawrence <alan.lawrence@arm.com>
- Backport r211502 from mainline.
- 2014-06-10 Alan Lawrence <alan.lawrence@arm.com>
+ Backport r211502 from mainline.
+ 2014-06-10 Alan Lawrence <alan.lawrence@arm.com>
PR target/59843
* gcc.dg/vect/vect-singleton_1.c: New file.
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/compat/struct-layout-1.exp b/gcc-4.9/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
index 13211c2..4c7d4c4 100644
--- a/gcc-4.9/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
+++ b/gcc-4.9/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
@@ -89,6 +89,9 @@ proc compat-use-tst-compiler { } {
# This must be done after the compat-use-*-compiler definitions.
load_lib compat.exp
+# Provide the g++-dg-prune routine (gcc-dp.exp is loaded by compat.exp)
+load_lib g++-dg.exp
+
g++_init
# Save variables for the C++ compiler under test, which each test will
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61160-1.C b/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61160-1.C
index a0fbb5f..69bd6a6 100644
--- a/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61160-1.C
+++ b/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61160-1.C
@@ -27,5 +27,6 @@ void *test (MMixin & anExample)
int main ()
{
CExample c;
- return (test (c) != &c);
+ test (c);
+ return 0;
}
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61160-2.C b/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61160-2.C
index 1011bd1..dd925d2 100644
--- a/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61160-2.C
+++ b/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61160-2.C
@@ -39,5 +39,6 @@ void *test (MMixin & anExample)
int main ()
{
CExample c;
- return (test (c) != &c);
+ test (c);
+ return 0;
}
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/tree-ssa/dom-invalid.C b/gcc-4.9/gcc/testsuite/g++.dg/tree-ssa/dom-invalid.C
index 91f43ae..68fc48c 100644
--- a/gcc-4.9/gcc/testsuite/g++.dg/tree-ssa/dom-invalid.C
+++ b/gcc-4.9/gcc/testsuite/g++.dg/tree-ssa/dom-invalid.C
@@ -1,7 +1,8 @@
+// { dg-message "note: file" "" }
// PR tree-optimization/39557
// invalid post-dom info leads to infinite loop
// { dg-do run }
-// { dg-options "-Wall -fno-exceptions -O2 -fprofile-use -fopt-info -fno-rtti" }
+// { dg-options "-Wall -fno-exceptions -O2 -fprofile-use -fno-rtti -fno-diagnostics-show-caret" }
struct C
{
@@ -49,4 +50,4 @@ main ()
{
E e;
e.bar ();
-} // { dg-message "note: file" "" }
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20050316-1.x b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20050316-1.x
index 121fcfe..cb2d28f 100644
--- a/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20050316-1.x
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20050316-1.x
@@ -4,4 +4,5 @@ if { [check_effective_target_int16] } {
return 1
}
+set additional_flags "-Wno-psabi"
return 0;
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20050604-1.x b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20050604-1.x
index f5b4aaa..756242d 100644
--- a/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20050604-1.x
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20050604-1.x
@@ -6,4 +6,5 @@ if { [istarget "i?86-*-*"] || [istarget "x86_64-*-*"] } {
set additional_flags "-mno-mmx"
}
+set additional_flags "-Wno-psabi"
return 0
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/pr26570.c b/gcc-4.9/gcc/testsuite/gcc.dg/pr26570.c
index 71c16f2..b122257 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/pr26570.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/pr26570.c
@@ -1,7 +1,8 @@
+/* { dg-message "note: file" "" } */
/* { dg-do compile } */
/* { dg-options "-O2 -fprofile-generate -fprofile-use -fopt-info" } */
unsigned test (unsigned a, unsigned b)
{
return a / b;
-} /* { dg-message "note: \[^\n\]*execution counts estimated" } */
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/pr32773.c b/gcc-4.9/gcc/testsuite/gcc.dg/pr32773.c
index 19a9019..c9bcb43 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/pr32773.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/pr32773.c
@@ -1,3 +1,4 @@
+/* { dg-message "note: file" "" } */
/* { dg-do compile } */
/* { dg-options "-O -fprofile-use -fopt-info" } */
/* { dg-options "-O -m4 -fprofile-use -fopt-info" { target sh-*-* } } */
@@ -6,4 +7,4 @@ void foo (int *p)
{
if (p)
*p = 0;
-} /* { dg-message "note: \[^\n\]*execution counts estimated" } */
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/stack-usage-2.c b/gcc-4.9/gcc/testsuite/gcc.dg/stack-usage-2.c
index d3c17a8..df7e55f 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/stack-usage-2.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/stack-usage-2.c
@@ -1,33 +1,32 @@
/* { dg-do compile } */
/* { dg-options "-Wstack-usage=512" } */
-int foo1 (void)
+int foo1 (void) /* { dg-bogus "stack usage" } */
{
char arr[16];
arr[0] = 1;
return 0;
-} /* { dg-bogus "stack usage" } */
+}
-int foo2 (void)
+int foo2 (void) /* { dg-warning "stack usage is \[0-9\]* bytes" } */
{
char arr[1024];
arr[0] = 1;
return 0;
-} /* { dg-warning "stack usage is \[0-9\]* bytes" } */
+}
-int foo3 (void)
+int foo3 (void) /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
{
char arr[1024] __attribute__((aligned (512)));
arr[0] = 1;
/* Force dynamic realignment of argument pointer. */
__builtin_apply ((void (*)()) foo2, 0, 0);
return 0;
+}
-} /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
-
-int foo4 (int n)
+int foo4 (int n) /* { dg-warning "stack usage might be unbounded" } */
{
char arr[n];
arr[0] = 1;
return 0;
-} /* { dg-warning "stack usage might be unbounded" } */
+}
diff --git a/gcc-4.9/gcc/toplev.c b/gcc-4.9/gcc/toplev.c
index 5280873..9b8d313 100644
--- a/gcc-4.9/gcc/toplev.c
+++ b/gcc-4.9/gcc/toplev.c
@@ -1073,16 +1073,19 @@ output_stack_usage (void)
if (warn_stack_usage >= 0)
{
+ const location_t loc = DECL_SOURCE_LOCATION (current_function_decl);
+
if (stack_usage_kind == DYNAMIC)
- warning (OPT_Wstack_usage_, "stack usage might be unbounded");
+ warning_at (loc, OPT_Wstack_usage_, "stack usage might be unbounded");
else if (stack_usage > warn_stack_usage)
{
if (stack_usage_kind == DYNAMIC_BOUNDED)
- warning (OPT_Wstack_usage_, "stack usage might be %wd bytes",
- stack_usage);
+ warning_at (loc,
+ OPT_Wstack_usage_, "stack usage might be %wd bytes",
+ stack_usage);
else
- warning (OPT_Wstack_usage_, "stack usage is %wd bytes",
- stack_usage);
+ warning_at (loc, OPT_Wstack_usage_, "stack usage is %wd bytes",
+ stack_usage);
}
}
}
diff --git a/gcc-4.9/gcc/tree-profile.c b/gcc-4.9/gcc/tree-profile.c
index 4e2e874..b165251 100644
--- a/gcc-4.9/gcc/tree-profile.c
+++ b/gcc-4.9/gcc/tree-profile.c
@@ -256,6 +256,9 @@ static tree GTY(()) gcov_lipo_merge_modu_edges = NULL_TREE;
/* extern gcov_unsigned_t __gcov_lipo_strict_inclusion */
static tree GTY(()) gcov_lipo_strict_inclusion = NULL_TREE;
+/* extern gcov_unsigned_t __gcov_lipo_comdat_algorithm */
+static tree GTY(()) gcov_lipo_comdat_algorithm = NULL_TREE;
+
/* Insert STMT_IF around given sequence of consecutive statements in the
same basic block starting with STMT_START, ending with STMT_END.
PROB is the probability of the taken branch. */
@@ -493,6 +496,13 @@ tree_init_dyn_ipa_parameters (void)
get_gcov_unsigned_t ());
init_comdat_decl (gcov_lipo_strict_inclusion,
PARAM_LIPO_WEAK_INCLUSION);
+ gcov_lipo_comdat_algorithm = build_decl (
+ UNKNOWN_LOCATION,
+ VAR_DECL,
+ get_identifier ("__gcov_lipo_comdat_algorithm"),
+ get_gcov_unsigned_t ());
+ init_comdat_decl (gcov_lipo_comdat_algorithm,
+ PARAM_LIPO_COMDAT_ALGORITHM);
}
}
@@ -1264,7 +1274,8 @@ tree_profiling (void)
function body from being deleted) won't be needed. */
if (L_IPO_COMP_MODE)
lipo_link_and_fixup ();
- init_node_map (true);
+ else
+ init_node_map (true);
FOR_EACH_DEFINED_FUNCTION (node)
diff --git a/gcc-4.9/gcc/tree-ssa-copy.c b/gcc-4.9/gcc/tree-ssa-copy.c
index 02f4743..a3d8392 100644
--- a/gcc-4.9/gcc/tree-ssa-copy.c
+++ b/gcc-4.9/gcc/tree-ssa-copy.c
@@ -235,38 +235,26 @@ copy_prop_visit_cond_stmt (gimple stmt, edge *taken_edge_p)
enum ssa_prop_result retval = SSA_PROP_VARYING;
location_t loc = gimple_location (stmt);
- tree op0 = gimple_cond_lhs (stmt);
- tree op1 = gimple_cond_rhs (stmt);
+ tree op0 = valueize_val (gimple_cond_lhs (stmt));
+ tree op1 = valueize_val (gimple_cond_rhs (stmt));
- /* The only conditionals that we may be able to compute statically
- are predicates involving two SSA_NAMEs. */
- if (TREE_CODE (op0) == SSA_NAME && TREE_CODE (op1) == SSA_NAME)
+ /* See if we can determine the predicate's value. */
+ if (dump_file && (dump_flags & TDF_DETAILS))
{
- op0 = valueize_val (op0);
- op1 = valueize_val (op1);
-
- /* See if we can determine the predicate's value. */
- if (dump_file && (dump_flags & TDF_DETAILS))
- {
- fprintf (dump_file, "Trying to determine truth value of ");
- fprintf (dump_file, "predicate ");
- print_gimple_stmt (dump_file, stmt, 0, 0);
- }
+ fprintf (dump_file, "Trying to determine truth value of ");
+ fprintf (dump_file, "predicate ");
+ print_gimple_stmt (dump_file, stmt, 0, 0);
+ }
- /* We can fold COND and get a useful result only when we have
- the same SSA_NAME on both sides of a comparison operator. */
- if (op0 == op1)
- {
- tree folded_cond = fold_binary_loc (loc, gimple_cond_code (stmt),
- boolean_type_node, op0, op1);
- if (folded_cond)
- {
- basic_block bb = gimple_bb (stmt);
- *taken_edge_p = find_taken_edge (bb, folded_cond);
- if (*taken_edge_p)
- retval = SSA_PROP_INTERESTING;
- }
- }
+ /* Fold COND and see whether we get a useful result. */
+ tree folded_cond = fold_binary_loc (loc, gimple_cond_code (stmt),
+ boolean_type_node, op0, op1);
+ if (folded_cond)
+ {
+ basic_block bb = gimple_bb (stmt);
+ *taken_edge_p = find_taken_edge (bb, folded_cond);
+ if (*taken_edge_p)
+ retval = SSA_PROP_INTERESTING;
}
if (dump_file && (dump_flags & TDF_DETAILS) && *taken_edge_p)
diff --git a/gcc-4.9/gcc/value-prof.c b/gcc-4.9/gcc/value-prof.c
index c0bd065..62046de 100644
--- a/gcc-4.9/gcc/value-prof.c
+++ b/gcc-4.9/gcc/value-prof.c
@@ -1276,7 +1276,17 @@ gimple_mod_subtract_transform (gimple_stmt_iterator *si)
return true;
}
-static pointer_map_t *cgraph_node_map;
+static pointer_map_t *cgraph_node_map = 0;
+
+/* Returns true if node graph is initialized. This
+ * is used to test if profile_id has been created
+ * for cgraph_nodes. */
+
+bool
+coverage_node_map_initialized_p (void)
+{
+ return cgraph_node_map != 0;
+}
/* Initialize map from PROFILE_ID to CGRAPH_NODE.
When LOCAL is true, the PROFILE_IDs are computed. when it is false we assume
@@ -1292,8 +1302,7 @@ init_node_map (bool local)
return;
FOR_EACH_DEFINED_FUNCTION (n)
- if (cgraph_function_with_gimple_body_p (n)
- && !cgraph_only_called_directly_p (n))
+ if (cgraph_function_with_gimple_body_p (n))
{
void **val;
if (local)
diff --git a/gcc-4.9/gnattools/ChangeLog b/gcc-4.9/gnattools/ChangeLog
index 8da4465..ca1c728 100644
--- a/gcc-4.9/gnattools/ChangeLog
+++ b/gcc-4.9/gnattools/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-04-22 Release Manager
* GCC 4.9.0 released.
diff --git a/gcc-4.9/include/ChangeLog b/gcc-4.9/include/ChangeLog
index c69467b..5023227 100644
--- a/gcc-4.9/include/ChangeLog
+++ b/gcc-4.9/include/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-04-22 Release Manager
* GCC 4.9.0 released.
diff --git a/gcc-4.9/intl/ChangeLog b/gcc-4.9/intl/ChangeLog
index 83ceb0a..4a30e7b 100644
--- a/gcc-4.9/intl/ChangeLog
+++ b/gcc-4.9/intl/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-04-22 Release Manager
* GCC 4.9.0 released.
diff --git a/gcc-4.9/libada/ChangeLog b/gcc-4.9/libada/ChangeLog
index dcabfa9..94ea2e0 100644
--- a/gcc-4.9/libada/ChangeLog
+++ b/gcc-4.9/libada/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-04-22 Release Manager
* GCC 4.9.0 released.
diff --git a/gcc-4.9/libatomic/ChangeLog b/gcc-4.9/libatomic/ChangeLog
index 9a546c1..f78862f 100644
--- a/gcc-4.9/libatomic/ChangeLog
+++ b/gcc-4.9/libatomic/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-04-22 Release Manager
* GCC 4.9.0 released.
diff --git a/gcc-4.9/libbacktrace/ChangeLog b/gcc-4.9/libbacktrace/ChangeLog
index 8bcc677..8acd472 100644
--- a/gcc-4.9/libbacktrace/ChangeLog
+++ b/gcc-4.9/libbacktrace/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-05-08 Ian Lance Taylor <iant@google.com>
Backport from mainline:
diff --git a/gcc-4.9/libcilkrts/ChangeLog b/gcc-4.9/libcilkrts/ChangeLog
index bb75077..5f36983 100644
--- a/gcc-4.9/libcilkrts/ChangeLog
+++ b/gcc-4.9/libcilkrts/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-04-22 Release Manager
* GCC 4.9.0 released.
diff --git a/gcc-4.9/libcpp/ChangeLog b/gcc-4.9/libcpp/ChangeLog
index e0e39e3..32bb84f 100644
--- a/gcc-4.9/libcpp/ChangeLog
+++ b/gcc-4.9/libcpp/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-07-09 Edward Smith-Rowland <3dw4rd@verizon.net>
PR c++/58155 - -Wliteral-suffix warns about tokens which are skipped
diff --git a/gcc-4.9/libcpp/po/ChangeLog b/gcc-4.9/libcpp/po/ChangeLog
index 49879ab..b9f6038 100644
--- a/gcc-4.9/libcpp/po/ChangeLog
+++ b/gcc-4.9/libcpp/po/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-04-22 Release Manager
* GCC 4.9.0 released.
diff --git a/gcc-4.9/libdecnumber/ChangeLog b/gcc-4.9/libdecnumber/ChangeLog
index 367babb..c3215a6 100644
--- a/gcc-4.9/libdecnumber/ChangeLog
+++ b/gcc-4.9/libdecnumber/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-04-22 Release Manager
* GCC 4.9.0 released.
diff --git a/gcc-4.9/libffi/ChangeLog b/gcc-4.9/libffi/ChangeLog
index bc2ab9c..6b22f69 100644
--- a/gcc-4.9/libffi/ChangeLog
+++ b/gcc-4.9/libffi/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-04-22 Release Manager
* GCC 4.9.0 released.
diff --git a/gcc-4.9/libgcc/ChangeLog b/gcc-4.9/libgcc/ChangeLog
index 9f17a7d..1edf552 100644
--- a/gcc-4.9/libgcc/ChangeLog
+++ b/gcc-4.9/libgcc/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-07-14 Richard Biener <rguenther@suse.de>
Backport r212520 from trunk.
* libgcov.h (struct gcov_fn_info): Make ctrs size 1.
diff --git a/gcc-4.9/libgcc/config/libbid/ChangeLog b/gcc-4.9/libgcc/config/libbid/ChangeLog
index 60132c4..c3f8386 100644
--- a/gcc-4.9/libgcc/config/libbid/ChangeLog
+++ b/gcc-4.9/libgcc/config/libbid/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-04-22 Release Manager
* GCC 4.9.0 released.
diff --git a/gcc-4.9/libgcc/dyn-ipa.c b/gcc-4.9/libgcc/dyn-ipa.c
index eb5ae9c..e66b02b 100644
--- a/gcc-4.9/libgcc/dyn-ipa.c
+++ b/gcc-4.9/libgcc/dyn-ipa.c
@@ -54,6 +54,7 @@ struct dyn_cgraph_edge
struct dyn_cgraph_edge *next_caller;
struct dyn_cgraph_edge *next_callee;
gcov_type count;
+ int indirect;
};
struct dyn_module_info
@@ -78,6 +79,36 @@ struct dyn_cgraph
unsigned num_nodes_executed;
/* used by new algorithm */
struct modu_node *modu_nodes;
+ /* Set indexed by lineno_checksum, returns a linked list of
+ checksum_alias_info structs. */
+ struct dyn_pointer_set *lineno_pointer_sets;
+};
+
+/* Struct holding information for functions with the same lineno_checksum. */
+struct lineno_checksum_alias
+{
+ struct checksum_alias_info *cfg_checksum_list;
+ unsigned lineno_checksum;
+};
+
+/* Struct holding information about functions with the same lineno and cfg
+ checksums. */
+struct checksum_alias_info
+{
+ struct checksum_alias_info *next_cfg_checksum;
+ struct checksum_alias *alias_list;
+ unsigned cfg_checksum;
+};
+
+/* Implements list of guid and corresponding fi_ptr for functions with matching
+ checksums. */
+struct checksum_alias
+{
+ struct checksum_alias *next_alias;
+ gcov_type guid;
+ const struct gcov_fn_info *fi_ptr;
+ /* Does this function have all-zero arc counts? */
+ int zero_counts;
};
/* Module info is stored in dyn_caph->sup_modules
@@ -141,6 +172,7 @@ extern gcov_unsigned_t __gcov_lipo_random_group_size;
extern gcov_unsigned_t __gcov_lipo_propagate_scale;
extern gcov_unsigned_t __gcov_lipo_dump_cgraph;
extern gcov_unsigned_t __gcov_lipo_max_mem;
+extern gcov_unsigned_t __gcov_lipo_comdat_algorithm;
extern gcov_unsigned_t __gcov_lipo_grouping_algorithm;
extern gcov_unsigned_t __gcov_lipo_merge_modu_edges;
extern gcov_unsigned_t __gcov_lipo_weak_inclusion;
@@ -149,7 +181,7 @@ extern gcov_unsigned_t __gcov_lipo_weak_inclusion;
void __gcov_build_callgraph (void) {}
#else
-void __gcov_compute_module_groups (void) ATTRIBUTE_HIDDEN;
+int __gcov_compute_module_groups (void) ATTRIBUTE_HIDDEN;
void __gcov_finalize_dyn_callgraph (void) ATTRIBUTE_HIDDEN;
static void gcov_dump_callgraph (gcov_type);
static void gcov_dump_cgraph_node_short (struct dyn_cgraph_node *node);
@@ -173,6 +205,7 @@ pointer_set_create (unsigned (*get_key) (const void *));
static struct dyn_cgraph the_dyn_call_graph;
static int total_zero_count = 0;
static int total_insane_count = 0;
+static int fixup_type = 0;
enum GROUPING_ALGORITHM
{
@@ -185,6 +218,24 @@ static int flag_weak_inclusion;
static int flag_use_existing_grouping;
static gcov_unsigned_t mem_threshold;
+gcov_type
+gcov_find_new_ic_target (gcov_type caller_guid, gcov_type callee_guid);
+void
+__gcov_dyn_ipa_merge_add (gcov_type *dest, gcov_type *src, unsigned n_counters);
+void
+__gcov_dyn_ipa_merge_ior (gcov_type *dest, gcov_type *src, unsigned n_counters);
+void
+__gcov_dyn_ipa_merge_dc (gcov_type *dest, gcov_type *src, unsigned n_counters);
+void
+__gcov_dyn_ipa_merge_icall_topn (gcov_type *dest, gcov_type *src,
+ unsigned n_counters);
+void
+__gcov_dyn_ipa_merge_single (gcov_type *dest, gcov_type *src,
+ unsigned n_counters);
+void
+__gcov_dyn_ipa_merge_delta (gcov_type *dest, gcov_type *src,
+ unsigned n_counters);
+
/* Returns 0 if no dump is enabled. Returns 1 if text form graph
dump is enabled. Returns 2 if .dot form dump is enabled. */
@@ -318,6 +369,102 @@ gcov_info_get_key (const void *p)
return get_module_ident ((const struct gcov_info *)p);
}
+/* The lineno_checksum value in P is the key for lineno_pointer_sets. */
+
+static inline unsigned
+lineno_checksum_get_key (const void *p)
+{
+ return ((const struct lineno_checksum_alias *) p)->lineno_checksum;
+}
+
+/* Create a new checksum_alias struct for function with GUID, FI_PTR,
+ and ZERO_COUNTS flag. Prepends to list NEXT and returns new struct. */
+
+static struct checksum_alias *
+new_checksum_alias (gcov_type guid, const struct gcov_fn_info *fi_ptr,
+ int zero_counts,
+ struct checksum_alias *next)
+{
+ struct checksum_alias *alias = XNEW (struct checksum_alias);
+ alias->next_alias = next;
+ alias->fi_ptr = fi_ptr;
+ alias->guid = guid;
+ alias->zero_counts = zero_counts;
+ return alias;
+}
+
+/* Locate the checksum_alias_info in LIST that matches CFG_CHECKSUM. */
+
+static struct checksum_alias_info *
+find_cfg_checksum (struct checksum_alias_info *list, unsigned cfg_checksum)
+{
+ for (; list; list = list->next_cfg_checksum)
+ {
+ if (list->cfg_checksum == cfg_checksum)
+ return list;
+ }
+ return NULL;
+}
+
+/* Insert a new checksum_alias struct into LIST for function with
+ CFG_CHECKSUM and associated GUID, FI_PTR, and ZERO_COUNTS flag. */
+
+static struct checksum_alias_info *
+cfg_checksum_insert (unsigned cfg_checksum, gcov_type guid,
+ const struct gcov_fn_info *fi_ptr, int zero_counts,
+ struct checksum_alias_info *list)
+{
+ struct checksum_alias_info *alias_info;
+ alias_info = find_cfg_checksum (list, cfg_checksum);
+ if (alias_info)
+ {
+ gcc_assert (alias_info->alias_list);
+ alias_info->alias_list = new_checksum_alias (guid, fi_ptr, zero_counts,
+ alias_info->alias_list);
+ return list;
+ }
+ else
+ {
+ alias_info = XNEW (struct checksum_alias_info);
+ alias_info->next_cfg_checksum = list;
+ alias_info->cfg_checksum = cfg_checksum;
+ alias_info->alias_list = new_checksum_alias (guid, fi_ptr, zero_counts,
+ NULL);
+ return alias_info;
+ }
+}
+
+/* Insert a new checksum_alias struct into lineno_pointer_sets for function with
+ LINENO_CHECKSUM and CFG_CHECKSUM with associated GUID, FI_PTR, and
+ ZERO_COUNTS flag. */
+
+static void
+checksum_set_insert (unsigned lineno_checksum, unsigned cfg_checksum,
+ gcov_type guid, const struct gcov_fn_info *fi_ptr,
+ int zero_counts)
+{
+ struct dyn_pointer_set *p = the_dyn_call_graph.lineno_pointer_sets;
+ if (!p)
+ the_dyn_call_graph.lineno_pointer_sets = p =
+ pointer_set_create (lineno_checksum_get_key);
+ struct lineno_checksum_alias **m = (struct lineno_checksum_alias **)
+ pointer_set_find_or_insert (p, lineno_checksum);
+ if (*m)
+ {
+ (*m)->cfg_checksum_list = cfg_checksum_insert (cfg_checksum, guid,
+ fi_ptr, zero_counts,
+ (*m)->cfg_checksum_list);
+ }
+ else
+ {
+ *m = XNEW (struct lineno_checksum_alias);
+ (*m)->lineno_checksum = lineno_checksum;
+ (*m)->cfg_checksum_list = cfg_checksum_insert (cfg_checksum, guid,
+ fi_ptr, zero_counts, NULL);
+ p->n_elements++;
+ }
+}
+
static struct dyn_pointer_set *
get_exported_to (unsigned module_ident)
{
@@ -428,6 +575,10 @@ init_dyn_call_graph (void)
fprintf (stderr, "Group mem limit: %u KB \n",
__gcov_lipo_max_mem);
+ if (do_dump)
+ fprintf (stderr, "COMDAT fixup algorithm: %u\n",
+ __gcov_lipo_comdat_algorithm);
+
for (; gi_ptr; gi_ptr = gi_ptr->next)
{
/* mod_idx is module_ident - 1. */
@@ -563,12 +714,13 @@ gcov_add_in_edge (struct dyn_cgraph_node *callee,
}
/* Add a call graph edge between caller CALLER and callee CALLEE.
- The edge count is COUNT. */
+ The edge count is COUNT and INDIRECT flags whether the call was
+ direct or indirect. */
static void
gcov_add_cgraph_edge (struct dyn_cgraph_node *caller,
struct dyn_cgraph_node *callee,
- gcov_type count)
+ gcov_type count, int indirect)
{
struct dyn_cgraph_edge *new_edge = XNEW (struct dyn_cgraph_edge);
new_edge->caller = caller;
@@ -576,6 +728,7 @@ gcov_add_cgraph_edge (struct dyn_cgraph_node *caller,
new_edge->count = count;
new_edge->next_caller = 0;
new_edge->next_callee = 0;
+ new_edge->indirect = indirect;
gcov_add_out_edge (caller, new_edge);
gcov_add_in_edge (callee, new_edge);
@@ -609,7 +762,7 @@ gcov_build_callgraph_dc_fn (struct dyn_cgraph_node *caller,
total_insane_count++;
continue;
}
- gcov_add_cgraph_edge (caller, callee, count);
+ gcov_add_cgraph_edge (caller, callee, count, 0);
}
}
@@ -643,7 +796,7 @@ gcov_build_callgraph_ic_fn (struct dyn_cgraph_node *caller,
total_insane_count++;
continue;
}
- gcov_add_cgraph_edge (caller, callee, count);
+ gcov_add_cgraph_edge (caller, callee, count, 1);
}
}
}
@@ -690,7 +843,7 @@ gcov_build_callgraph (void)
if (i == GCOV_COUNTER_ICALL_TOPNV)
gcov_build_callgraph_ic_fn (caller, ci_ptr->values, ci_ptr->num);
- if (i == GCOV_COUNTER_ARCS && 0)
+ if (i == GCOV_COUNTER_ARCS)
{
gcov_type total_arc_count = 0;
unsigned arc;
@@ -698,6 +851,10 @@ gcov_build_callgraph (void)
total_arc_count += ci_ptr->values[arc];
if (total_arc_count != 0)
the_dyn_call_graph.num_nodes_executed++;
+ if (fixup_type)
+ checksum_set_insert (fi_ptr->lineno_checksum,
+ fi_ptr->cfg_checksum, caller->guid,
+ fi_ptr, total_arc_count == 0);
}
ci_ptr++;
}
@@ -2290,9 +2447,622 @@ read_modu_groups_from_imports_files (void)
#endif /* IN_GCOV_TOOL */
}
-/* Compute module groups needed for L-IPO compilation. */
+/* Scan functions in MOD_INFO and return gcov_fn_info for matching
+ FUNC_ID. */
+
+static const struct gcov_fn_info *
+find_fn_info_from_func_id (struct gcov_info *mod_info, unsigned func_id)
+{
+ unsigned j;
+ for (j = 0; j < mod_info->n_functions; j++)
+ {
+ const struct gcov_fn_info *fi_ptr = mod_info->functions[j];
+ if (fi_ptr->ident == func_id)
+ return fi_ptr;
+ }
+ gcc_assert (0);
+ return NULL;
+}
+
+/* Look for a function in the same module as CALLER_GUID that has
+ the same lineno and cfg checksums as CALLEE_GUID. Return the
+ guid of the matching function if exactly one is found, 0 otherwise. */
+
+gcov_type
+gcov_find_new_ic_target (gcov_type caller_guid, gcov_type callee_guid)
+{
+ /* Obtain the callee's function info. */
+ unsigned callee_mod_id = get_module_ident_from_func_glob_uid (callee_guid);
+ struct gcov_info *callee_mod_info = get_module_info (callee_mod_id);
+ unsigned callee_func_id = get_intra_module_func_id (callee_guid);
+ const struct gcov_fn_info *callee_fi_ptr
+ = find_fn_info_from_func_id (callee_mod_info, callee_func_id);
+
+ /* Obtain the list of checksum_alias structures for functions with
+ the same lineno and cfg checksum as callee. */
+ struct dyn_pointer_set *p = the_dyn_call_graph.lineno_pointer_sets;
+ gcc_assert (p);
+ struct lineno_checksum_alias **line_alias = (struct lineno_checksum_alias **)
+ pointer_set_find_or_insert (p, callee_fi_ptr->lineno_checksum);
+ gcc_assert (*line_alias);
+ struct checksum_alias_info *cfg_alias
+ = find_cfg_checksum ((*line_alias)->cfg_checksum_list,
+ callee_fi_ptr->cfg_checksum);
+ gcc_assert (cfg_alias);
+
+
+ /* Scan the list of checksum aliases for one that is located in caller's
+ module. */
+ gcov_type new_guid = 0;
+ unsigned caller_mod_id = get_module_ident_from_func_glob_uid (caller_guid);
+ struct checksum_alias *alias;
+ for (alias = cfg_alias->alias_list; alias;
+ alias = alias->next_alias)
+ {
+ if (get_module_ident_from_func_glob_uid (alias->guid)
+ == caller_mod_id)
+ {
+ /* Give up if we found multiple matches. */
+ if (new_guid)
+ return 0;
+ new_guid = alias->guid;
+ }
+ }
+
+ /* We found exactly one match, return it. */
+ return new_guid;
+}
+
+/* If any of CALLER's indirect call counters in CI_PTR has a target that is
+ not in CALLER's module group, see if we can find a copy of the function in
+ CALLER's module. If so, replace the target to point to that copy. See
+ comments for gcov_fixup_icall_profile on why we would want to do this.
+ Return 1 if any icall profiles were updated, 0 otherwise. */
+
+static int
+gcov_fixup_ic_fn (struct dyn_cgraph_node *caller,
+ const struct gcov_ctr_info *ci_ptr)
+{
+ unsigned i, j;
+ int changed = 0;
+ gcov_type *icall_counters = ci_ptr->values;
+ unsigned n_counts = ci_ptr->num;
+ int do_dump = (do_cgraph_dump () != 0);
+
+ unsigned caller_mod_id = get_module_ident_from_func_glob_uid (caller->guid);
+ struct dyn_pointer_set *imported_mods = get_imported_modus (caller_mod_id);
+ for (i = 0; i < n_counts; i += GCOV_ICALL_TOPN_NCOUNTS)
+ {
+ gcov_type *value_array = &icall_counters[i + 1];
+ for (j = 0; j < GCOV_ICALL_TOPN_NCOUNTS - 1; j += 2)
+ {
+ struct dyn_cgraph_node *callee;
+ gcov_type count;
+ gcov_type callee_guid = value_array[j];
+
+ count = value_array[j + 1];
+ if (count == 0)
+ continue;
+
+ callee = get_cgraph_node (callee_guid);
+ if (!callee)
+ continue;
+
+ /* Now check if callee is in the module group of caller. If so,
+ no need for any fixup. */
+ unsigned callee_mod_id
+ = get_module_ident_from_func_glob_uid (callee_guid);
+ if (pointer_set_contains (imported_mods, callee_mod_id))
+ continue;
+
+ /* Attempt to find a copy of callee in caller's module. */
+ gcov_type new_callee_guid
+ = gcov_find_new_ic_target (caller->guid, callee_guid);
+
+ if (do_dump == 1)
+ {
+ struct gcov_info *caller_mod_info
+ = the_dyn_call_graph.modules[caller_mod_id - 1];
+ struct gcov_info *callee_mod_info
+ = the_dyn_call_graph.modules[callee_mod_id - 1];
+ fprintf (stderr,
+ "Fixup icall %u:%u -> %u:%u with count %lld "
+ "(%s -> %s): ",
+ caller_mod_id, get_intra_module_func_id (caller->guid),
+ callee_mod_id, get_intra_module_func_id (callee_guid),
+ (long long) count,
+ caller_mod_info->mod_info->source_filename,
+ callee_mod_info->mod_info->source_filename);
+ if (!new_callee_guid)
+ fprintf (stderr,"No target found\n");
+ else
+ fprintf (stderr,"Found new target %u:%u (%llx)\n",
+ get_module_ident_from_func_glob_uid (new_callee_guid),
+ get_intra_module_func_id (new_callee_guid),
+ (long long) new_callee_guid);
+ }
+
+ if (new_callee_guid)
+ {
+ /* Update the profile info and note the need for a profile
+ counter rewrite. */
+ value_array[j] = new_callee_guid;
+ changed = 1;
+ }
+ }
+ }
+ return changed;
+}
+
+/* Look for indirect call profiles that target callee's outside of the caller's
+ module group, and see if we can find a copy of the function in caller's own
+ module. If so, replace the profile target to point to that copy. This is
+ useful when the callee is a COMDAT, in which case there should be a copy
+ within CALLER's module. The linker would have selected a single copy of
+ COMDAT and all indirect call profiles would target that copy of the callee,
+ which might not end up in the module group of CALLER.
+ Return 1 if any icall profiles were updated, 0 otherwise. */
+
+static int
+gcov_fixup_icall_profile (void)
+{
+ struct gcov_info *gi_ptr;
+ unsigned m_ix;
+ int changed = 0;
+
+ for (m_ix = 0; m_ix < the_dyn_call_graph.num_modules; m_ix++)
+ {
+ const struct gcov_fn_info *fi_ptr;
+ unsigned f_ix, i;
+
+ gi_ptr = the_dyn_call_graph.modules[m_ix];
+ if (gi_ptr == NULL)
+ continue;
+
+ for (f_ix = 0; f_ix < gi_ptr->n_functions; f_ix++)
+ {
+ struct dyn_cgraph_node *caller;
+ const struct gcov_ctr_info *ci_ptr = 0;
+
+ fi_ptr = gi_ptr->functions[f_ix];
+ ci_ptr = fi_ptr->ctrs;
+
+ caller = (struct dyn_cgraph_node *) *(pointer_set_find_or_insert
+ (the_dyn_call_graph.call_graph_nodes[m_ix],
+ fi_ptr->ident));
+ gcc_assert (caller);
+
+ for (i = 0; i < GCOV_COUNTERS; i++)
+ {
+ if (!gi_ptr->merge[i])
+ continue;
+
+ if (i == GCOV_COUNTER_ICALL_TOPNV)
+ changed |= gcov_fixup_ic_fn (caller, ci_ptr);
+
+ ci_ptr++;
+ }
+ }
+ }
+ return changed;
+}
+
+/* Create, zero-initialize and return an array to hold merged counter
+ values. */
+
+static struct gcov_ctr_info *
+init_merged_ctrs (void)
+{
+ struct gcov_ctr_info *merged_ctrs = XNEWVEC (struct gcov_ctr_info,
+ GCOV_COUNTERS);
+ int i;
+ for (i = 0; i < GCOV_COUNTERS; i++)
+ {
+ merged_ctrs[i].num = 0;
+ merged_ctrs[i].values = NULL;
+ }
+ return merged_ctrs;
+}
+
+/* The profile merging function that just adds N_COUNTERS counters from array
+ SRC to those in DEST. Adapted from __gcov_merge_add. */
+
+void
+__gcov_dyn_ipa_merge_add (gcov_type *dest, gcov_type *src, unsigned n_counters)
+{
+ for (; n_counters; dest++, src++, n_counters--)
+ *dest += *src;
+}
+
+/* The profile merging function that just ors N_COUNTERS counters from array
+ SRC to those in DEST. Adapted from __gcov_merge_ior. */
+
+void
+__gcov_dyn_ipa_merge_ior (gcov_type *dest, gcov_type *src, unsigned n_counters)
+{
+ for (; n_counters; dest++, src++, n_counters--)
+ *dest |= *src;
+}
+
+
+/* The profile merging function that just merges N_COUNTERS direct call counters
+ from array SRC to those in DEST. Adapted from __gcov_merge_dc. */
+
+void
+__gcov_dyn_ipa_merge_dc (gcov_type *dest, gcov_type *src, unsigned n_counters)
+{
+ unsigned i;
+
+ gcc_assert (!(n_counters % 2));
+ for (i = 0; i < n_counters; i += 2)
+ {
+ gcov_type global_id = src[i];
+ if (!global_id)
+ continue;
+
+ /* Simply skip non-matching call targets. */
+ if (dest[i] && dest[i] != global_id)
+ {
+ continue;
+ }
+ dest[i] = global_id;
+
+ dest[i + 1] += src[i + 1];
+ }
+}
+
+/* The profile merging function that just merges N_COUNTERS indirect call
+ counters from array SRC to those in DEST. Adapted from
+ __gcov_merge_icall_topn. */
+
+void
+__gcov_dyn_ipa_merge_icall_topn (gcov_type *dest, gcov_type *src,
+ unsigned n_counters)
+{
+ unsigned i, j, k, m;
+
+ gcc_assert (!(n_counters % GCOV_ICALL_TOPN_NCOUNTS));
+ for (i = 0; i < n_counters; i += GCOV_ICALL_TOPN_NCOUNTS)
+ {
+ /* Skip the number_of_eviction entry (in dest[i]). */
+ gcov_type *value_array = &dest[i + 1];
+ unsigned tmp_size = 2 * (GCOV_ICALL_TOPN_NCOUNTS - 1);
+ gcov_type *tmp_array
+ = (gcov_type *) alloca (tmp_size * sizeof (gcov_type));
+
+ for (j = 0; j < tmp_size; j++)
+ tmp_array[j] = 0;
+
+ for (j = 0; j < GCOV_ICALL_TOPN_NCOUNTS - 1; j += 2)
+ {
+ tmp_array[j] = value_array[j];
+ tmp_array[j + 1] = value_array [j + 1];
+ }
+
+ /* Skip the number_of_eviction entry (in src[i]). */
+ gcov_type *src_value_array = &src[i + 1];
+ for (k = 0; k < GCOV_ICALL_TOPN_NCOUNTS - 1; k += 2)
+ {
+ int found = 0;
+ gcov_type global_id = src_value_array[k];
+ gcov_type call_count = src_value_array[k + 1];
+ for (m = 0; m < j; m += 2)
+ {
+ if (tmp_array[m] == global_id)
+ {
+ found = 1;
+ tmp_array[m + 1] += call_count;
+ break;
+ }
+ }
+ if (!found)
+ {
+ tmp_array[j] = global_id;
+ tmp_array[j + 1] = call_count;
+ j += 2;
+ }
+ }
+ /* Now sort the temp array. */
+ gcov_sort_n_vals (tmp_array, j);
+
+ /* Now copy back the top half of the temp array. */
+ for (k = 0; k < GCOV_ICALL_TOPN_NCOUNTS - 1; k += 2)
+ {
+ value_array[k] = tmp_array[k];
+ value_array[k + 1] = tmp_array[k + 1];
+ }
+ }
+}
+
+
+/* Time profiles are merged so that minimum from all valid (greater than zero)
+ is stored. There could be a fork that creates new counters. To have
+ the profile stable, we chosen to pick the smallest function visit time. */
+
void
+__gcov_dyn_ipa_merge_time_profile (gcov_type *dest, gcov_type *src,
+ unsigned n_counters)
+{
+ unsigned i;
+ gcov_type value;
+
+ for (i = 0; i < n_counters; i++)
+ {
+ value = src[i];
+
+ if (value && (!dest[i] || value < dest[i]))
+ dest[i] = value;
+ }
+}
+
+
+/* The profile merging function that just merges N_COUNTERS most common value
+ counters from array SRC to those in DEST. Adapted from
+ __gcov_merge_single. */
+
+void
+__gcov_dyn_ipa_merge_single (gcov_type *dest, gcov_type *src,
+ unsigned n_counters)
+{
+ unsigned i, n_measures;
+ gcov_type value, counter, all;
+
+ gcc_assert (!(n_counters % 3));
+ n_measures = n_counters / 3;
+ for (i = 0; i < n_measures; i++, dest += 3, src += 3)
+ {
+ value = src[0];
+ counter = src[1];
+ all = src[2];
+
+ if (dest[0] == value)
+ dest[1] += counter;
+ else if (counter > dest[1])
+ {
+ dest[0] = value;
+ dest[1] = counter - dest[1];
+ }
+ else
+ dest[1] -= counter;
+ dest[2] += all;
+ }
+}
+
+/* The profile merging function that just merges N_COUNTERS most common
+ difference counters from array SRC to those in DEST. Adapted from
+ __gcov_merge_delta. */
+
+void
+__gcov_dyn_ipa_merge_delta (gcov_type *dest, gcov_type *src,
+ unsigned n_counters)
+{
+ unsigned i, n_measures;
+ gcov_type value, counter, all;
+
+ gcc_assert (!(n_counters % 4));
+ n_measures = n_counters / 4;
+ for (i = 0; i < n_measures; i++, dest += 4, src += 4)
+ {
+ value = src[1];
+ counter = src[2];
+ all = src[3];
+
+ if (dest[1] == value)
+ dest[2] += counter;
+ else if (counter > dest[2])
+ {
+ dest[1] = value;
+ dest[2] = counter - dest[2];
+ }
+ else
+ dest[2] -= counter;
+ dest[3] += all;
+ }
+}
+
+/* Type of function used to merge counters. */
+typedef void (*gcov_dyn_ipa_merge_fn) (gcov_type *, gcov_type *,
+ gcov_unsigned_t);
+
+/* Merge functions for counters. */
+#define DEF_GCOV_COUNTER(COUNTER, NAME, FN_TYPE) __gcov_dyn_ipa_merge ## FN_TYPE,
+static gcov_dyn_ipa_merge_fn ctr_merge_functions[GCOV_COUNTERS] = {
+#include "gcov-counter.def"
+};
+#undef DEF_GCOV_COUNTER
+
+#if 0
+static gcov_dyn_ipa_merge_fn ctr_merge_functions[GCOV_COUNTERS] = {
+ __gcov_dyn_ipa_merge_add,
+ __gcov_dyn_ipa_merge_add,
+ __gcov_dyn_ipa_merge_add,
+ __gcov_dyn_ipa_merge_single,
+ __gcov_dyn_ipa_merge_delta,
+ __gcov_dyn_ipa_merge_single,
+ __gcov_dyn_ipa_merge_add,
+ __gcov_dyn_ipa_merge_ior,
+ __gcov_dyn_ipa_merge_icall_topn,
+ __gcov_dyn_ipa_merge_dc,
+};
+#endif
+
+/* Copy counters from SRC_CTRS array to DEST_CTRS array, where SRC_CTRS is
+ indexed by the GCOV_COUNTER type, and DEST_CTRS is an array holding only
+ the mergable counters to emit to the gcda file for DEST_GUID. */
+
+static void
+copy_ctrs (const struct gcov_ctr_info *dest_ctrs, gcov_type dest_guid,
+ const struct gcov_ctr_info *src_ctrs)
+{
+ unsigned dest_mod_id
+ = get_module_ident_from_func_glob_uid (dest_guid);
+ struct gcov_info *dest_mod_info = the_dyn_call_graph.modules[dest_mod_id - 1];
+ int i;
+ for (i = 0; i < GCOV_COUNTERS; i++)
+ {
+ if (!dest_mod_info->merge[i])
+ continue;
+
+ gcov_unsigned_t num = dest_ctrs->num;
+ // This could be different if code was optimized differently
+ // (e.g. early-inlined in some modules but not others).
+ // If they are different then just punt on merge of this counter
+ // (what about other counters?).
+ //gcc_assert (dest_ctrs[i].num == num);
+ if (num && src_ctrs[i].num == num)
+ (*ctr_merge_functions[i]) (dest_ctrs->values,
+ src_ctrs[i].values, num);
+ dest_ctrs++;
+ }
+}
+
+/* Merge counters from SRC_CTRS array to DEST_CTRS array, where DEST_CTRS is
+ indexed by the GCOV_COUNTER type, and SRC_CTRS is an array holding only
+ the mergable counters from the gcda file for SRC_GUID. */
+
+static void
+merge_ctrs (struct gcov_ctr_info *dest_ctrs,
+ const struct gcov_ctr_info *src_ctrs, gcov_type src_guid)
+{
+ unsigned src_mod_id
+ = get_module_ident_from_func_glob_uid (src_guid);
+ struct gcov_info *src_mod_info = the_dyn_call_graph.modules[src_mod_id - 1];
+ unsigned i, j;
+
+ for (i = 0; i < GCOV_COUNTERS; i++)
+ {
+ if (!src_mod_info->merge[i])
+ continue;
+
+ gcov_unsigned_t num = src_ctrs->num;
+ // This could be different if code was optimized differently
+ // (e.g. call counters when ipa-inlined in some modules but not others?).
+ // If they are different then just punt on merge of this counter
+ // (what about other counters?).
+ //gcc_assert (dest_ctrs[i].num == num);
+ if (num)
+ {
+ /* If this is the first source counter array containing counters for
+ this counter type, allocate the associated number of counter values
+ in the dest counter array. */
+ if (!dest_ctrs[i].num)
+ {
+ dest_ctrs[i].values = XNEWVEC (gcov_type, num);
+ for (j = 0; j < num; j++)
+ dest_ctrs[i].values[j] = 0;
+ dest_ctrs[i].num = num;
+ }
+ if (dest_ctrs[i].num == num)
+ (*ctr_merge_functions[i]) (dest_ctrs[i].values,
+ src_ctrs->values, num);
+ }
+ src_ctrs++;
+ }
+}
+
+/* Walks the set of functions that have the same lineno and cfg checksum, and
+ performs counter merging. INFO contains the checksum_alias_info structure
+ for a given lineno and cfg checksum combination. CHANGED points
+ to a flag that should be set to 1 if any fixups were applied. */
+
+static int
+gcov_fixup_counters_checksum (const struct checksum_alias_info *info,
+ int *changed)
+{
+ /* See if there are any zero count functions to fix. */
+ int found = 0;
+ struct checksum_alias *alias;
+ for (alias = info->alias_list; alias;
+ alias = alias->next_alias)
+ {
+ if (alias->zero_counts)
+ {
+ found = 1;
+ break;
+ }
+ }
+ if (!found)
+ return 1;
+
+ /* Walk the aliases and merge the non-zero counters into a dummy copy. */
+ struct gcov_ctr_info *merged_ctrs = init_merged_ctrs ();
+ found = 0;
+ for (alias = info->alias_list; alias;
+ alias = alias->next_alias)
+ {
+ if (alias->zero_counts)
+ continue;
+ merge_ctrs (merged_ctrs, alias->fi_ptr->ctrs, alias->guid);
+ found = 1;
+ }
+
+ /* Check if we found a non-zero count function to fix up from. */
+ if (!found)
+ return 1;
+
+ /* At this point we know we have a zero count function to fixup, and data
+ from which to fix it up. */
+ *changed = 1;
+
+ /* Walk them again and copy the merged counters into 0-count copies. */
+ for (alias = info->alias_list; alias;
+ alias = alias->next_alias)
+ {
+ if (!alias->zero_counts)
+ continue;
+ copy_ctrs (alias->fi_ptr->ctrs, alias->guid, merged_ctrs);
+ }
+
+ return 1;
+}
+
+/* Walks the set of functions that have the same lineno_checksum, and
+ performs counter merging for functions that have the same cfg_checksum
+ as well. VALUE contains the lineno_checksum_alias structure for a
+ given lineno_checksum, and DATA1 contains a pointer to a flag that
+ should be set to 1 if any fixups were applied. */
+
+static int
+gcov_fixup_counters_lineno (const void *value,
+ void *data1,
+ void *data2 ATTRIBUTE_UNUSED,
+ void *data3 ATTRIBUTE_UNUSED)
+{
+ const struct lineno_checksum_alias *a
+ = (const struct lineno_checksum_alias*) value;
+ int *changed = (int *) data1;
+ struct checksum_alias_info *cfg_alias_list = a->cfg_checksum_list;
+ for (; cfg_alias_list; cfg_alias_list = cfg_alias_list->next_cfg_checksum)
+ {
+ gcov_fixup_counters_checksum (cfg_alias_list, changed);
+ }
+ return 1;
+}
+
+/* Routine to perform counter fixup for COMDAT functions with missing counters.
+ Returns 1 if any updates were performed, 0 otherwise. Walks the sets of
+ functions having the same lineno and cfg checksums and merges all non-zero
+ counters, copying the merged counters into any copies with all-zero counts.
+ This is done because the linker will chose one out-of-line copy of a COMDAT,
+ and only that copy will get non-zero counters. Other copies that were IPA
+ inlined may have non-zero counts, which we don't overwrite as they contain
+ more context-sensitive data. */
+
+static int
+gcov_fixup_zero_counters (void)
+{
+ int changed = 0;
+ pointer_set_traverse (the_dyn_call_graph.lineno_pointer_sets,
+ gcov_fixup_counters_lineno,
+ &changed, 0, 0);
+ return changed;
+}
+
+/* Compute module groups needed for L-IPO compilation. Returns 1 if any
+ counter fixups were applied, requiring a profile rewrite, 0 otherwise. */
+
+int
__gcov_compute_module_groups (void)
{
gcov_type cut_off_count;
@@ -2310,7 +3080,7 @@ __gcov_compute_module_groups (void)
fprintf (stderr, " Creating random grouping with %u:%u\n",
__gcov_lipo_random_seed, __gcov_lipo_random_group_size);
}
- return;
+ return 0;
}
else if (seed && max_group_size)
{
@@ -2324,15 +3094,21 @@ __gcov_compute_module_groups (void)
fprintf (stderr, " Creating random grouping with %s:%s\n",
seed, max_group_size);
}
- return;
+ return 0;
}
if (flag_use_existing_grouping)
{
read_modu_groups_from_imports_files ();
- return;
+ return 0;
}
+ const char *do_fixup = 0;
+ fixup_type = __gcov_lipo_comdat_algorithm;
+ do_fixup = getenv ("GCOV_DYN_DO_FIXUP");
+ if (do_fixup)
+ fixup_type = atoi (do_fixup);
+
/* First compute dynamic call graph. */
gcov_build_callgraph ();
@@ -2342,6 +3118,13 @@ __gcov_compute_module_groups (void)
gcov_dump_callgraph (cut_off_count);
+ int changed = 0;
+ if (fixup_type & 0x2)
+ changed |= gcov_fixup_zero_counters ();
+ if (fixup_type & 0x1)
+ changed |= gcov_fixup_icall_profile ();
+
+ return changed;
}
/* Dumper function for NODE. */
diff --git a/gcc-4.9/libgcc/libgcov-driver.c b/gcc-4.9/libgcc/libgcov-driver.c
index e829fe5..dc8cf36 100644
--- a/gcc-4.9/libgcc/libgcov-driver.c
+++ b/gcc-4.9/libgcc/libgcov-driver.c
@@ -55,7 +55,7 @@ static gcov_unsigned_t gcov_cur_module_id = 0;
/* Dynamic call graph build and form module groups. */
-void __gcov_compute_module_groups (void) ATTRIBUTE_HIDDEN;
+int __gcov_compute_module_groups (void) ATTRIBUTE_HIDDEN;
void __gcov_finalize_dyn_callgraph (void) ATTRIBUTE_HIDDEN;
/* The following functions can be called from outside of this file. */
@@ -453,6 +453,49 @@ struct gcov_filename_aux{
/* Including system dependent components. */
#include "libgcov-driver-system.c"
+/* Scan through the current open gcda file corresponding to GI_PTR
+ to locate the end position of the last summary, returned in
+ SUMMARY_END_POS_P. Return 0 on success, -1 on error. */
+static int
+gcov_scan_summary_end (struct gcov_info *gi_ptr,
+ gcov_position_t *summary_end_pos_p)
+{
+ gcov_unsigned_t tag, version, stamp;
+ tag = gcov_read_unsigned ();
+ if (tag != GCOV_DATA_MAGIC)
+ {
+ gcov_error ("profiling:%s:Not a gcov data file\n", gi_filename);
+ return -1;
+ }
+
+ version = gcov_read_unsigned ();
+ if (!gcov_version (gi_ptr, version, gi_filename))
+ return -1;
+
+ stamp = gcov_read_unsigned ();
+ if (stamp != gi_ptr->stamp)
+ /* Read from a different compilation. Overwrite the file. */
+ return -1;
+
+ /* Look for program summary. */
+ while (1)
+ {
+ struct gcov_summary tmp;
+
+ *summary_end_pos_p = gcov_position ();
+ tag = gcov_read_unsigned ();
+ if (tag != GCOV_TAG_PROGRAM_SUMMARY)
+ break;
+
+ gcov_read_unsigned ();
+ gcov_read_summary (&tmp);
+ if (gcov_is_error ())
+ return -1;
+ }
+
+ return 0;
+}
+
/* This function merges counters in GI_PTR to an existing gcda file.
Return 0 on success.
Return -1 on error. In this case, caller will goto read_fatal. */
@@ -603,44 +646,13 @@ read_error:
return -1;
}
-/* Write counters in GI_PTR and the summary in PRG to a gcda file. In
- the case of appending to an existing file, SUMMARY_POS will be non-zero.
- We will write the file starting from SUMMAY_POS. */
+/* Write counters in GI_PTR to a gcda file starting from its current
+ location. */
static void
-gcov_exit_write_gcda (struct gcov_info *gi_ptr,
- const struct gcov_summary *prg_p,
- const gcov_position_t eof_pos,
- const gcov_position_t summary_pos)
+gcov_write_func_counters (struct gcov_info *gi_ptr)
{
unsigned f_ix;
- struct gcov_summary_buffer *next_sum_buffer;
-
- /* Write out the data. */
- if (!eof_pos)
- {
- gcov_write_tag_length (GCOV_DATA_MAGIC, GCOV_VERSION);
- gcov_write_unsigned (gi_ptr->stamp);
- }
-
- if (summary_pos)
- gcov_seek (summary_pos);
-
- /* Generate whole program statistics. */
- gcov_write_summary (GCOV_TAG_PROGRAM_SUMMARY, prg_p);
-
- /* Rewrite all the summaries that were after the summary we merged
- into. This is necessary as the merged summary may have a different
- size due to the number of non-zero histogram entries changing after
- merging. */
-
- while (sum_buffer)
- {
- gcov_write_summary (GCOV_TAG_PROGRAM_SUMMARY, &sum_buffer->summary);
- next_sum_buffer = sum_buffer->next;
- free (sum_buffer);
- sum_buffer = next_sum_buffer;
- }
/* Write execution counts for each function. */
for (f_ix = 0; f_ix != gi_ptr->n_functions; f_ix++)
@@ -700,6 +712,50 @@ gcov_exit_write_gcda (struct gcov_info *gi_ptr,
gcov_write_unsigned (0);
}
+/* Write counters in GI_PTR and the summary in PRG to a gcda file. In
+ the case of appending to an existing file, SUMMARY_POS will be non-zero.
+ We will write the file starting from SUMMAY_POS. */
+
+static void
+gcov_exit_write_gcda (struct gcov_info *gi_ptr,
+ const struct gcov_summary *prg_p,
+ const gcov_position_t eof_pos,
+ const gcov_position_t summary_pos)
+
+{
+ struct gcov_summary_buffer *next_sum_buffer;
+
+ /* Write out the data. */
+ if (!eof_pos)
+ {
+ gcov_write_tag_length (GCOV_DATA_MAGIC, GCOV_VERSION);
+ gcov_write_unsigned (gi_ptr->stamp);
+ }
+
+ if (summary_pos)
+ gcov_seek (summary_pos);
+ gcc_assert (!summary_pos || summary_pos == gcov_position ());
+
+ /* Generate whole program statistics. */
+ gcov_write_summary (GCOV_TAG_PROGRAM_SUMMARY, prg_p);
+
+ /* Rewrite all the summaries that were after the summary we merged
+ into. This is necessary as the merged summary may have a different
+ size due to the number of non-zero histogram entries changing after
+ merging. */
+
+ while (sum_buffer)
+ {
+ gcov_write_summary (GCOV_TAG_PROGRAM_SUMMARY, &sum_buffer->summary);
+ next_sum_buffer = sum_buffer->next;
+ free (sum_buffer);
+ sum_buffer = next_sum_buffer;
+ }
+
+ /* Write the counters. */
+ gcov_write_func_counters (gi_ptr);
+}
+
/* Helper function for merging summary.
Return -1 on error. Return 0 on success. */
@@ -964,7 +1020,9 @@ gcov_dump_module_info (struct gcov_filename_aux *gf)
{
struct gcov_info *gi_ptr;
- __gcov_compute_module_groups ();
+ /* Compute the module groups and record whether there were any
+ counter fixups applied that require rewriting the counters. */
+ int changed = __gcov_compute_module_groups ();
/* Now write out module group info. */
for (gi_ptr = __gcov_list; gi_ptr; gi_ptr = gi_ptr->next)
@@ -974,8 +1032,27 @@ gcov_dump_module_info (struct gcov_filename_aux *gf)
if (gcov_exit_open_gcda_file (gi_ptr, gf) == -1)
continue;
+ if (changed)
+ {
+ /* Scan file to find the end of the summary section, which is
+ where we will start re-writing the counters. */
+ gcov_position_t summary_end_pos;
+ if (gcov_scan_summary_end (gi_ptr, &summary_end_pos) == -1)
+ gcov_error ("profiling:%s:Error scanning summaries\n",
+ gi_filename);
+ else
+ {
+ gcov_position_t eof_pos = gi_ptr->eof_pos;
+ gcov_rewrite ();
+ gcov_seek (summary_end_pos);
+ gcov_write_func_counters (gi_ptr);
+ gcc_assert (eof_pos == gi_ptr->eof_pos);
+ }
+ }
+ else
+ gcov_rewrite ();
+
/* Overwrite the zero word at the of the file. */
- gcov_rewrite ();
gcov_seek (gi_ptr->eof_pos);
gcov_write_module_infos (gi_ptr);
diff --git a/gcc-4.9/libgcc/libgcov-interface.c b/gcc-4.9/libgcc/libgcov-interface.c
index 77d8395..a3effa4 100644
--- a/gcc-4.9/libgcc/libgcov-interface.c
+++ b/gcc-4.9/libgcc/libgcov-interface.c
@@ -129,6 +129,100 @@ unsigned int __gcov_profiling_for_test_coverage (void)
return __gcov_test_coverage;
}
+typedef void (*gcov_dumper_type) (void);
+struct dumper_entry
+{
+ gcov_dumper_type dumper;
+ struct dumper_entry *next_dumper;
+};
+
+static struct dumper_entry this_dumper = {&__gcov_dump, 0};
+
+/* global dumper list with default visibilty. */
+struct dumper_entry *__gcov_dumper_list;
+
+#ifdef __GTHREAD_MUTEX_INIT
+__gthread_mutex_t __gcov_dump_mx = __GTHREAD_MUTEX_INIT;
+#define init_mx_once()
+#else
+__gthread_mutex_t __gcov_dump_mx;
+
+static void
+init_mx (void)
+{
+ __GTHREAD_MUTEX_INIT_FUNCTION (&__gcov_dump_mx);
+}
+static void
+init_mx_once (void)
+{
+ static __gthread_once_t once = __GTHREAD_ONCE_INIT;
+ __gthread_once (&once, init_mx);
+}
+#endif
+
+/* Register the library private __gcov_dump method
+ to the global list. */
+
+__attribute__((constructor))
+static void
+register_dumper (void)
+{
+ init_mx_once ();
+ __gthread_mutex_lock (&__gcov_dump_mx);
+ this_dumper.next_dumper = __gcov_dumper_list;
+ __gcov_dumper_list = &this_dumper;
+ __gthread_mutex_unlock (&__gcov_dump_mx);
+}
+
+__attribute__((destructor))
+static void
+unregister_dumper (void)
+{
+ struct dumper_entry *dumper;
+ struct dumper_entry *prev_dumper = 0;
+
+ init_mx_once ();
+ __gthread_mutex_lock (&__gcov_dump_mx);
+ dumper = __gcov_dumper_list;
+
+ while (dumper)
+ {
+ if (dumper->dumper == &__gcov_dump)
+ {
+ if (prev_dumper)
+ prev_dumper->next_dumper = dumper->next_dumper;
+ else
+ __gcov_dumper_list = dumper->next_dumper;
+ break;
+ }
+ prev_dumper = dumper;
+ dumper = dumper->next_dumper;
+ }
+ __gthread_mutex_unlock (&__gcov_dump_mx);
+}
+
+/* Public interface to dump profile data for all shared libraries
+ via registered dumpers from the libraries. This interface
+ has default visibility (unlike gcov_dump which has hidden
+ visbility. */
+
+void
+__gcov_dump_all (void)
+{
+ struct dumper_entry *dumper;
+
+ init_mx_once ();
+ __gthread_mutex_lock (&__gcov_dump_mx);
+
+ dumper = __gcov_dumper_list;
+ while (dumper)
+ {
+ dumper->dumper ();
+ dumper = dumper->next_dumper;
+ }
+ __gthread_mutex_unlock (&__gcov_dump_mx);
+}
+
#endif /* L_gcov_dump */
#ifdef L_gcov_sampling
diff --git a/gcc-4.9/libgcc/libgcov-util.c b/gcc-4.9/libgcc/libgcov-util.c
index d1401b5..09d5886 100644
--- a/gcc-4.9/libgcc/libgcov-util.c
+++ b/gcc-4.9/libgcc/libgcov-util.c
@@ -88,7 +88,9 @@ static int k_ctrs_types;
/* The longest length of all the filenames. */
static int max_filename_len;
-/* Merge functions for counters. */
+/* Merge functions for counters. Similar to __gcov_dyn_ipa_merge_*
+ functions in dyn-ipa.c, which were derived from these, except
+ the versions in dyn-ipa are used when merging from another array. */
#define DEF_GCOV_COUNTER(COUNTER, NAME, FN_TYPE) __gcov_merge ## FN_TYPE,
static gcov_merge_fn ctr_merge_functions[GCOV_COUNTERS] = {
#include "gcov-counter.def"
@@ -430,11 +432,7 @@ read_gcda_file (const char *filename)
/* Read version. */
version = gcov_read_unsigned ();
if (version != GCOV_VERSION)
- {
- fnotice (stderr, "%s:incorrect gcov version %d vs %d \n", filename, version, GCOV_VERSION);
- gcov_close ();
- return NULL;
- }
+ warning (0, "%s:incorrect gcov version %d vs %d \n", filename, version, GCOV_VERSION);
/* Instantiate a gcov_info object. */
curr_gcov_info = obj_info = (struct gcov_info *) xcalloc (sizeof (struct gcov_info) +
diff --git a/gcc-4.9/libgcc/libgcov.h b/gcc-4.9/libgcc/libgcov.h
index 25534ac..fdfb650 100644
--- a/gcc-4.9/libgcc/libgcov.h
+++ b/gcc-4.9/libgcc/libgcov.h
@@ -272,8 +272,15 @@ extern void __gcov_flush (void) ATTRIBUTE_HIDDEN;
/* Function to reset all counters to 0. */
extern void __gcov_reset (void);
-/* Function to enable early write of profile information so far. */
-extern void __gcov_dump (void);
+/* Function to enable early write of profile information so far.
+ __gcov_dump is also used by __gcov_dump_all. The latter
+ depends on __GCOV_DUMP to have hidden or protected visibility
+ so that each library has its own copy of the registered dumper. */
+extern void __gcov_dump (void) ATTRIBUTE_HIDDEN;
+
+/* Call __gcov_dump registered from each shared library.
+ This function must have default visibility. */
+void __gcov_dump_all (void);
/* The merge function that just sums the counters. */
extern void __gcov_merge_add (gcov_type *, unsigned) ATTRIBUTE_HIDDEN;
diff --git a/gcc-4.9/libgfortran/ChangeLog b/gcc-4.9/libgfortran/ChangeLog
index 2d19304..89f2c8a 100644
--- a/gcc-4.9/libgfortran/ChangeLog
+++ b/gcc-4.9/libgfortran/ChangeLog
@@ -1,3 +1,61 @@
+2014-07-31 Janne Blomqvist <jb@gcc.gnu.org>
+
+ Backport from mainline
+ CVE-2014-5044
+ * libgfortran.h (xmallocarray): New prototype.
+ * runtime/memory.c (xmallocarray): New function.
+ (xcalloc): Check for nonzero separately instead of multiplying.
+ * generated/*.c: Regenerated.
+ * intrinsics/cshift0.c (cshift0): Call xmallocarray instead of
+ xmalloc.
+ * intrinsics/eoshift0.c (eoshift0): Likewise.
+ * intrinsics/eoshift2.c (eoshift2): Likewise.
+ * intrinsics/pack_generic.c (pack_internal): Likewise.
+ (pack_s_internal): Likewise.
+ * intrinsics/reshape_generic.c (reshape_internal): Likewise.
+ * intrinsics/spread_generic.c (spread_internal): Likewise.
+ (spread_internal_scalar): Likewise.
+ * intrinsics/string_intrinsics_inc.c (string_trim): Likewise.
+ (string_minmax): Likewise.
+ * intrinsics/transpose_generic.c (transpose_internal): Likewise.
+ * intrinsics/unpack_generic.c (unpack_internal): Likewise.
+ * io/list_read.c (nml_touch_nodes): Don't cast xmalloc return value.
+ * io/transfer.c (st_set_nml_var): Call xmallocarray instead of
+ xmalloc.
+ * io/unit.c (get_internal_unit): Likewise.
+ (filename_from_unit): Don't cast xmalloc return value.
+ * io/write.c (nml_write_obj): Likewise, formatting.
+ * m4/bessel.m4 (bessel_jn_r'rtype_kind`): Call xmallocarray
+ instead of xmalloc.
+ (besse_yn_r'rtype_kind`): Likewise.
+ * m4/cshift1.m4 (cshift1): Likewise.
+ * m4/eoshift1.m4 (eoshift1): Likewise.
+ * m4/eoshift3.m4 (eoshift3): Likewise.
+ * m4/iforeach.m4: Likewise.
+ * m4/ifunction.m4: Likewise.
+ * m4/ifunction_logical.m4 (name`'rtype_qual`_'atype_code):
+ Likewise.
+ * m4/in_pack.m4 (internal_pack_'rtype_ccode`): Likewise.
+ * m4/matmul.m4 (matmul_'rtype_code`): Likewise.
+ * m4/matmull.m4 (matmul_'rtype_code`): Likewise.
+ * m4/pack.m4 (pack_'rtype_code`): Likewise.
+ * m4/reshape.m4 (reshape_'rtype_ccode`): Likewise.
+ * m4/shape.m4 (shape_'rtype_kind`): Likewise.
+ * m4/spread.m4 (spread_'rtype_code`): Likewise.
+ (spread_scalar_'rtype_code`): Likewise.
+ * m4/transpose.m4 (transpose_'rtype_code`): Likewise.
+ * m4/unpack.m4 (unpack0_'rtype_code`): Likewise.
+ (unpack1_'rtype_code`): Likewise.
+ * runtime/convert_char.c (convert_char1_to_char4): Likewise.
+ (convert_char4_to_char1): Simplify.
+ * runtime/environ.c (init_unformatted): Call xmallocarray instead
+ of xmalloc.
+ * runtime/in_pack_generic.c (internal_pack): Likewise.
+
+2014-07-16 Release Manager
+
+ * GCC 4.9.1 released.
+
2014-07-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Backport from trunk.
diff --git a/gcc-4.9/libgfortran/generated/all_l1.c b/gcc-4.9/libgfortran/generated/all_l1.c
index ed95622..0f008b9 100644
--- a/gcc-4.9/libgfortran/generated/all_l1.c
+++ b/gcc-4.9/libgfortran/generated/all_l1.c
@@ -101,8 +101,7 @@ all_l1 (gfc_array_l1 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -111,7 +110,7 @@ all_l1 (gfc_array_l1 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/all_l16.c b/gcc-4.9/libgfortran/generated/all_l16.c
index a23001b..a9f85b4 100644
--- a/gcc-4.9/libgfortran/generated/all_l16.c
+++ b/gcc-4.9/libgfortran/generated/all_l16.c
@@ -101,8 +101,7 @@ all_l16 (gfc_array_l16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -111,7 +110,7 @@ all_l16 (gfc_array_l16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/all_l2.c b/gcc-4.9/libgfortran/generated/all_l2.c
index 28235d6..3ef4a1d 100644
--- a/gcc-4.9/libgfortran/generated/all_l2.c
+++ b/gcc-4.9/libgfortran/generated/all_l2.c
@@ -101,8 +101,7 @@ all_l2 (gfc_array_l2 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -111,7 +110,7 @@ all_l2 (gfc_array_l2 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/all_l4.c b/gcc-4.9/libgfortran/generated/all_l4.c
index 601b7c3..58dab4f 100644
--- a/gcc-4.9/libgfortran/generated/all_l4.c
+++ b/gcc-4.9/libgfortran/generated/all_l4.c
@@ -101,8 +101,7 @@ all_l4 (gfc_array_l4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -111,7 +110,7 @@ all_l4 (gfc_array_l4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/all_l8.c b/gcc-4.9/libgfortran/generated/all_l8.c
index f0041dc..4293aaa 100644
--- a/gcc-4.9/libgfortran/generated/all_l8.c
+++ b/gcc-4.9/libgfortran/generated/all_l8.c
@@ -101,8 +101,7 @@ all_l8 (gfc_array_l8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -111,7 +110,7 @@ all_l8 (gfc_array_l8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/any_l1.c b/gcc-4.9/libgfortran/generated/any_l1.c
index b94c847..46387fd 100644
--- a/gcc-4.9/libgfortran/generated/any_l1.c
+++ b/gcc-4.9/libgfortran/generated/any_l1.c
@@ -101,8 +101,7 @@ any_l1 (gfc_array_l1 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -111,7 +110,7 @@ any_l1 (gfc_array_l1 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/any_l16.c b/gcc-4.9/libgfortran/generated/any_l16.c
index a821352..b29fdd9 100644
--- a/gcc-4.9/libgfortran/generated/any_l16.c
+++ b/gcc-4.9/libgfortran/generated/any_l16.c
@@ -101,8 +101,7 @@ any_l16 (gfc_array_l16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -111,7 +110,7 @@ any_l16 (gfc_array_l16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/any_l2.c b/gcc-4.9/libgfortran/generated/any_l2.c
index 7f4eabc..a63c593 100644
--- a/gcc-4.9/libgfortran/generated/any_l2.c
+++ b/gcc-4.9/libgfortran/generated/any_l2.c
@@ -101,8 +101,7 @@ any_l2 (gfc_array_l2 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -111,7 +110,7 @@ any_l2 (gfc_array_l2 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/any_l4.c b/gcc-4.9/libgfortran/generated/any_l4.c
index 8ec451a..ccd35d7 100644
--- a/gcc-4.9/libgfortran/generated/any_l4.c
+++ b/gcc-4.9/libgfortran/generated/any_l4.c
@@ -101,8 +101,7 @@ any_l4 (gfc_array_l4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -111,7 +110,7 @@ any_l4 (gfc_array_l4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/any_l8.c b/gcc-4.9/libgfortran/generated/any_l8.c
index 47957a7..e089ea8 100644
--- a/gcc-4.9/libgfortran/generated/any_l8.c
+++ b/gcc-4.9/libgfortran/generated/any_l8.c
@@ -101,8 +101,7 @@ any_l8 (gfc_array_l8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -111,7 +110,7 @@ any_l8 (gfc_array_l8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/bessel_r10.c b/gcc-4.9/libgfortran/generated/bessel_r10.c
index 980bf84..14b93e9 100644
--- a/gcc-4.9/libgfortran/generated/bessel_r10.c
+++ b/gcc-4.9/libgfortran/generated/bessel_r10.c
@@ -55,7 +55,7 @@ bessel_jn_r10 (gfc_array_r10 * const restrict ret, int n1, int n2, GFC_REAL_10 x
{
size_t size = n2 < n1 ? 0 : n2-n1+1;
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
- ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size);
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_10));
ret->offset = 0;
}
@@ -122,7 +122,7 @@ bessel_yn_r10 (gfc_array_r10 * const restrict ret, int n1, int n2,
{
size_t size = n2 < n1 ? 0 : n2-n1+1;
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
- ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * size);
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_10));
ret->offset = 0;
}
diff --git a/gcc-4.9/libgfortran/generated/bessel_r16.c b/gcc-4.9/libgfortran/generated/bessel_r16.c
index d5757c9..d64fa9c 100644
--- a/gcc-4.9/libgfortran/generated/bessel_r16.c
+++ b/gcc-4.9/libgfortran/generated/bessel_r16.c
@@ -59,7 +59,7 @@ bessel_jn_r16 (gfc_array_r16 * const restrict ret, int n1, int n2, GFC_REAL_16 x
{
size_t size = n2 < n1 ? 0 : n2-n1+1;
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
- ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size);
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_16));
ret->offset = 0;
}
@@ -126,7 +126,7 @@ bessel_yn_r16 (gfc_array_r16 * const restrict ret, int n1, int n2,
{
size_t size = n2 < n1 ? 0 : n2-n1+1;
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
- ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * size);
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_16));
ret->offset = 0;
}
diff --git a/gcc-4.9/libgfortran/generated/bessel_r4.c b/gcc-4.9/libgfortran/generated/bessel_r4.c
index 6b6129f..a86bb5f 100644
--- a/gcc-4.9/libgfortran/generated/bessel_r4.c
+++ b/gcc-4.9/libgfortran/generated/bessel_r4.c
@@ -55,7 +55,7 @@ bessel_jn_r4 (gfc_array_r4 * const restrict ret, int n1, int n2, GFC_REAL_4 x)
{
size_t size = n2 < n1 ? 0 : n2-n1+1;
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
- ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size);
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_4));
ret->offset = 0;
}
@@ -122,7 +122,7 @@ bessel_yn_r4 (gfc_array_r4 * const restrict ret, int n1, int n2,
{
size_t size = n2 < n1 ? 0 : n2-n1+1;
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
- ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * size);
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_4));
ret->offset = 0;
}
diff --git a/gcc-4.9/libgfortran/generated/bessel_r8.c b/gcc-4.9/libgfortran/generated/bessel_r8.c
index a80a766..8401887 100644
--- a/gcc-4.9/libgfortran/generated/bessel_r8.c
+++ b/gcc-4.9/libgfortran/generated/bessel_r8.c
@@ -55,7 +55,7 @@ bessel_jn_r8 (gfc_array_r8 * const restrict ret, int n1, int n2, GFC_REAL_8 x)
{
size_t size = n2 < n1 ? 0 : n2-n1+1;
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
- ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size);
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_8));
ret->offset = 0;
}
@@ -122,7 +122,7 @@ bessel_yn_r8 (gfc_array_r8 * const restrict ret, int n1, int n2,
{
size_t size = n2 < n1 ? 0 : n2-n1+1;
GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1);
- ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * size);
+ ret->base_addr = xmallocarray (size, sizeof (GFC_REAL_8));
ret->offset = 0;
}
diff --git a/gcc-4.9/libgfortran/generated/count_16_l.c b/gcc-4.9/libgfortran/generated/count_16_l.c
index f690236..c6c0b5b 100644
--- a/gcc-4.9/libgfortran/generated/count_16_l.c
+++ b/gcc-4.9/libgfortran/generated/count_16_l.c
@@ -101,8 +101,7 @@ count_16_l (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -111,7 +110,7 @@ count_16_l (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/count_1_l.c b/gcc-4.9/libgfortran/generated/count_1_l.c
index 359a2f9..15d270d 100644
--- a/gcc-4.9/libgfortran/generated/count_1_l.c
+++ b/gcc-4.9/libgfortran/generated/count_1_l.c
@@ -101,8 +101,7 @@ count_1_l (gfc_array_i1 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -111,7 +110,7 @@ count_1_l (gfc_array_i1 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/count_2_l.c b/gcc-4.9/libgfortran/generated/count_2_l.c
index 0dd51a1..fd9b3d3 100644
--- a/gcc-4.9/libgfortran/generated/count_2_l.c
+++ b/gcc-4.9/libgfortran/generated/count_2_l.c
@@ -101,8 +101,7 @@ count_2_l (gfc_array_i2 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -111,7 +110,7 @@ count_2_l (gfc_array_i2 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/count_4_l.c b/gcc-4.9/libgfortran/generated/count_4_l.c
index 7879ce8..1e15256 100644
--- a/gcc-4.9/libgfortran/generated/count_4_l.c
+++ b/gcc-4.9/libgfortran/generated/count_4_l.c
@@ -101,8 +101,7 @@ count_4_l (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -111,7 +110,7 @@ count_4_l (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/count_8_l.c b/gcc-4.9/libgfortran/generated/count_8_l.c
index 21516f5..97962a4 100644
--- a/gcc-4.9/libgfortran/generated/count_8_l.c
+++ b/gcc-4.9/libgfortran/generated/count_8_l.c
@@ -101,8 +101,7 @@ count_8_l (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -111,7 +110,7 @@ count_8_l (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/cshift1_16.c b/gcc-4.9/libgfortran/generated/cshift1_16.c
index 77fc3bf..b0cc767 100644
--- a/gcc-4.9/libgfortran/generated/cshift1_16.c
+++ b/gcc-4.9/libgfortran/generated/cshift1_16.c
@@ -80,7 +80,7 @@ cshift1 (gfc_array_char * const restrict ret,
{
int i;
- ret->base_addr = xmalloc (size * arraysize);
+ ret->base_addr = xmallocarray (arraysize, size);
ret->offset = 0;
ret->dtype = array->dtype;
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
diff --git a/gcc-4.9/libgfortran/generated/cshift1_4.c b/gcc-4.9/libgfortran/generated/cshift1_4.c
index 8accb4c..5ea8a6a 100644
--- a/gcc-4.9/libgfortran/generated/cshift1_4.c
+++ b/gcc-4.9/libgfortran/generated/cshift1_4.c
@@ -80,7 +80,7 @@ cshift1 (gfc_array_char * const restrict ret,
{
int i;
- ret->base_addr = xmalloc (size * arraysize);
+ ret->base_addr = xmallocarray (arraysize, size);
ret->offset = 0;
ret->dtype = array->dtype;
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
diff --git a/gcc-4.9/libgfortran/generated/cshift1_8.c b/gcc-4.9/libgfortran/generated/cshift1_8.c
index 6c809a9..5c4dbc3 100644
--- a/gcc-4.9/libgfortran/generated/cshift1_8.c
+++ b/gcc-4.9/libgfortran/generated/cshift1_8.c
@@ -80,7 +80,7 @@ cshift1 (gfc_array_char * const restrict ret,
{
int i;
- ret->base_addr = xmalloc (size * arraysize);
+ ret->base_addr = xmallocarray (arraysize, size);
ret->offset = 0;
ret->dtype = array->dtype;
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
diff --git a/gcc-4.9/libgfortran/generated/eoshift1_16.c b/gcc-4.9/libgfortran/generated/eoshift1_16.c
index 188589f..566d807 100644
--- a/gcc-4.9/libgfortran/generated/eoshift1_16.c
+++ b/gcc-4.9/libgfortran/generated/eoshift1_16.c
@@ -105,8 +105,8 @@ eoshift1 (gfc_array_char * const restrict ret,
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
}
- /* xmalloc allocates a single byte for zero size. */
- ret->base_addr = xmalloc (size * arraysize);
+ /* xmallocarray allocates a single byte for zero size. */
+ ret->base_addr = xmallocarray (arraysize, size);
}
else if (unlikely (compile_options.bounds_check))
diff --git a/gcc-4.9/libgfortran/generated/eoshift1_4.c b/gcc-4.9/libgfortran/generated/eoshift1_4.c
index 81e8550..bd5faba 100644
--- a/gcc-4.9/libgfortran/generated/eoshift1_4.c
+++ b/gcc-4.9/libgfortran/generated/eoshift1_4.c
@@ -105,8 +105,8 @@ eoshift1 (gfc_array_char * const restrict ret,
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
}
- /* xmalloc allocates a single byte for zero size. */
- ret->base_addr = xmalloc (size * arraysize);
+ /* xmallocarray allocates a single byte for zero size. */
+ ret->base_addr = xmallocarray (arraysize, size);
}
else if (unlikely (compile_options.bounds_check))
diff --git a/gcc-4.9/libgfortran/generated/eoshift1_8.c b/gcc-4.9/libgfortran/generated/eoshift1_8.c
index eff6f76..814f81a 100644
--- a/gcc-4.9/libgfortran/generated/eoshift1_8.c
+++ b/gcc-4.9/libgfortran/generated/eoshift1_8.c
@@ -105,8 +105,8 @@ eoshift1 (gfc_array_char * const restrict ret,
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
}
- /* xmalloc allocates a single byte for zero size. */
- ret->base_addr = xmalloc (size * arraysize);
+ /* xmallocarray allocates a single byte for zero size. */
+ ret->base_addr = xmallocarray (arraysize, size);
}
else if (unlikely (compile_options.bounds_check))
diff --git a/gcc-4.9/libgfortran/generated/eoshift3_16.c b/gcc-4.9/libgfortran/generated/eoshift3_16.c
index fc5203d..5e09df2 100644
--- a/gcc-4.9/libgfortran/generated/eoshift3_16.c
+++ b/gcc-4.9/libgfortran/generated/eoshift3_16.c
@@ -89,7 +89,7 @@ eoshift3 (gfc_array_char * const restrict ret,
{
int i;
- ret->base_addr = xmalloc (size * arraysize);
+ ret->base_addr = xmallocarray (arraysize, size);
ret->offset = 0;
ret->dtype = array->dtype;
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
@@ -107,8 +107,8 @@ eoshift3 (gfc_array_char * const restrict ret,
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
}
- /* xmalloc allocates a single byte for zero size. */
- ret->base_addr = xmalloc (size * arraysize);
+ /* xmallocarray allocates a single byte for zero size. */
+ ret->base_addr = xmallocarray (arraysize, size);
}
else if (unlikely (compile_options.bounds_check))
diff --git a/gcc-4.9/libgfortran/generated/eoshift3_4.c b/gcc-4.9/libgfortran/generated/eoshift3_4.c
index ee2b568..970402c 100644
--- a/gcc-4.9/libgfortran/generated/eoshift3_4.c
+++ b/gcc-4.9/libgfortran/generated/eoshift3_4.c
@@ -89,7 +89,7 @@ eoshift3 (gfc_array_char * const restrict ret,
{
int i;
- ret->base_addr = xmalloc (size * arraysize);
+ ret->base_addr = xmallocarray (arraysize, size);
ret->offset = 0;
ret->dtype = array->dtype;
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
@@ -107,8 +107,8 @@ eoshift3 (gfc_array_char * const restrict ret,
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
}
- /* xmalloc allocates a single byte for zero size. */
- ret->base_addr = xmalloc (size * arraysize);
+ /* xmallocarray allocates a single byte for zero size. */
+ ret->base_addr = xmallocarray (arraysize, size);
}
else if (unlikely (compile_options.bounds_check))
diff --git a/gcc-4.9/libgfortran/generated/eoshift3_8.c b/gcc-4.9/libgfortran/generated/eoshift3_8.c
index b2e6d26..991eb91 100644
--- a/gcc-4.9/libgfortran/generated/eoshift3_8.c
+++ b/gcc-4.9/libgfortran/generated/eoshift3_8.c
@@ -89,7 +89,7 @@ eoshift3 (gfc_array_char * const restrict ret,
{
int i;
- ret->base_addr = xmalloc (size * arraysize);
+ ret->base_addr = xmallocarray (arraysize, size);
ret->offset = 0;
ret->dtype = array->dtype;
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
@@ -107,8 +107,8 @@ eoshift3 (gfc_array_char * const restrict ret,
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
}
- /* xmalloc allocates a single byte for zero size. */
- ret->base_addr = xmalloc (size * arraysize);
+ /* xmallocarray allocates a single byte for zero size. */
+ ret->base_addr = xmallocarray (arraysize, size);
}
else if (unlikely (compile_options.bounds_check))
diff --git a/gcc-4.9/libgfortran/generated/iall_i1.c b/gcc-4.9/libgfortran/generated/iall_i1.c
index ac36bac..da0ce4d 100644
--- a/gcc-4.9/libgfortran/generated/iall_i1.c
+++ b/gcc-4.9/libgfortran/generated/iall_i1.c
@@ -97,10 +97,9 @@ iall_i1 (gfc_array_i1 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -272,8 +271,7 @@ miall_i1 (gfc_array_i1 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -285,7 +283,7 @@ miall_i1 (gfc_array_i1 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
}
else
@@ -430,8 +428,7 @@ siall_i1 (gfc_array_i1 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -440,7 +437,7 @@ siall_i1 (gfc_array_i1 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/iall_i16.c b/gcc-4.9/libgfortran/generated/iall_i16.c
index de33361..a3f39d3 100644
--- a/gcc-4.9/libgfortran/generated/iall_i16.c
+++ b/gcc-4.9/libgfortran/generated/iall_i16.c
@@ -97,10 +97,9 @@ iall_i16 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -272,8 +271,7 @@ miall_i16 (gfc_array_i16 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -285,7 +283,7 @@ miall_i16 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
@@ -430,8 +428,7 @@ siall_i16 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -440,7 +437,7 @@ siall_i16 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/iall_i2.c b/gcc-4.9/libgfortran/generated/iall_i2.c
index a347036..4ca06a8 100644
--- a/gcc-4.9/libgfortran/generated/iall_i2.c
+++ b/gcc-4.9/libgfortran/generated/iall_i2.c
@@ -97,10 +97,9 @@ iall_i2 (gfc_array_i2 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -272,8 +271,7 @@ miall_i2 (gfc_array_i2 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -285,7 +283,7 @@ miall_i2 (gfc_array_i2 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
}
else
@@ -430,8 +428,7 @@ siall_i2 (gfc_array_i2 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -440,7 +437,7 @@ siall_i2 (gfc_array_i2 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/iall_i4.c b/gcc-4.9/libgfortran/generated/iall_i4.c
index 55e09b8..8ff15f4 100644
--- a/gcc-4.9/libgfortran/generated/iall_i4.c
+++ b/gcc-4.9/libgfortran/generated/iall_i4.c
@@ -97,10 +97,9 @@ iall_i4 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -272,8 +271,7 @@ miall_i4 (gfc_array_i4 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -285,7 +283,7 @@ miall_i4 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
@@ -430,8 +428,7 @@ siall_i4 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -440,7 +437,7 @@ siall_i4 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/iall_i8.c b/gcc-4.9/libgfortran/generated/iall_i8.c
index 9c7f88d..08932d4 100644
--- a/gcc-4.9/libgfortran/generated/iall_i8.c
+++ b/gcc-4.9/libgfortran/generated/iall_i8.c
@@ -97,10 +97,9 @@ iall_i8 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -272,8 +271,7 @@ miall_i8 (gfc_array_i8 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -285,7 +283,7 @@ miall_i8 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
@@ -430,8 +428,7 @@ siall_i8 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -440,7 +437,7 @@ siall_i8 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/iany_i1.c b/gcc-4.9/libgfortran/generated/iany_i1.c
index 2ce620b..999230a 100644
--- a/gcc-4.9/libgfortran/generated/iany_i1.c
+++ b/gcc-4.9/libgfortran/generated/iany_i1.c
@@ -97,10 +97,9 @@ iany_i1 (gfc_array_i1 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -272,8 +271,7 @@ miany_i1 (gfc_array_i1 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -285,7 +283,7 @@ miany_i1 (gfc_array_i1 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
}
else
@@ -430,8 +428,7 @@ siany_i1 (gfc_array_i1 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -440,7 +437,7 @@ siany_i1 (gfc_array_i1 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/iany_i16.c b/gcc-4.9/libgfortran/generated/iany_i16.c
index 38e28d1..9410db4 100644
--- a/gcc-4.9/libgfortran/generated/iany_i16.c
+++ b/gcc-4.9/libgfortran/generated/iany_i16.c
@@ -97,10 +97,9 @@ iany_i16 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -272,8 +271,7 @@ miany_i16 (gfc_array_i16 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -285,7 +283,7 @@ miany_i16 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
@@ -430,8 +428,7 @@ siany_i16 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -440,7 +437,7 @@ siany_i16 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/iany_i2.c b/gcc-4.9/libgfortran/generated/iany_i2.c
index 7a4b79c..7068bb1 100644
--- a/gcc-4.9/libgfortran/generated/iany_i2.c
+++ b/gcc-4.9/libgfortran/generated/iany_i2.c
@@ -97,10 +97,9 @@ iany_i2 (gfc_array_i2 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -272,8 +271,7 @@ miany_i2 (gfc_array_i2 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -285,7 +283,7 @@ miany_i2 (gfc_array_i2 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
}
else
@@ -430,8 +428,7 @@ siany_i2 (gfc_array_i2 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -440,7 +437,7 @@ siany_i2 (gfc_array_i2 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/iany_i4.c b/gcc-4.9/libgfortran/generated/iany_i4.c
index 126c2fa..62034cf 100644
--- a/gcc-4.9/libgfortran/generated/iany_i4.c
+++ b/gcc-4.9/libgfortran/generated/iany_i4.c
@@ -97,10 +97,9 @@ iany_i4 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -272,8 +271,7 @@ miany_i4 (gfc_array_i4 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -285,7 +283,7 @@ miany_i4 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
@@ -430,8 +428,7 @@ siany_i4 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -440,7 +437,7 @@ siany_i4 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/iany_i8.c b/gcc-4.9/libgfortran/generated/iany_i8.c
index ee2a07f..f347d69 100644
--- a/gcc-4.9/libgfortran/generated/iany_i8.c
+++ b/gcc-4.9/libgfortran/generated/iany_i8.c
@@ -97,10 +97,9 @@ iany_i8 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -272,8 +271,7 @@ miany_i8 (gfc_array_i8 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -285,7 +283,7 @@ miany_i8 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
@@ -430,8 +428,7 @@ siany_i8 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -440,7 +437,7 @@ siany_i8 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/in_pack_c10.c b/gcc-4.9/libgfortran/generated/in_pack_c10.c
index ff3bb33..9148af5 100644
--- a/gcc-4.9/libgfortran/generated/in_pack_c10.c
+++ b/gcc-4.9/libgfortran/generated/in_pack_c10.c
@@ -76,7 +76,7 @@ internal_pack_c10 (gfc_array_c10 * source)
return source->base_addr;
/* Allocate storage for the destination. */
- destptr = (GFC_COMPLEX_10 *)xmalloc (ssize * sizeof (GFC_COMPLEX_10));
+ destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_10));
dest = destptr;
src = source->base_addr;
stride0 = stride[0];
diff --git a/gcc-4.9/libgfortran/generated/in_pack_c16.c b/gcc-4.9/libgfortran/generated/in_pack_c16.c
index a3e9612..e109efc 100644
--- a/gcc-4.9/libgfortran/generated/in_pack_c16.c
+++ b/gcc-4.9/libgfortran/generated/in_pack_c16.c
@@ -76,7 +76,7 @@ internal_pack_c16 (gfc_array_c16 * source)
return source->base_addr;
/* Allocate storage for the destination. */
- destptr = (GFC_COMPLEX_16 *)xmalloc (ssize * sizeof (GFC_COMPLEX_16));
+ destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_16));
dest = destptr;
src = source->base_addr;
stride0 = stride[0];
diff --git a/gcc-4.9/libgfortran/generated/in_pack_c4.c b/gcc-4.9/libgfortran/generated/in_pack_c4.c
index 2959354..3afdaf3 100644
--- a/gcc-4.9/libgfortran/generated/in_pack_c4.c
+++ b/gcc-4.9/libgfortran/generated/in_pack_c4.c
@@ -76,7 +76,7 @@ internal_pack_c4 (gfc_array_c4 * source)
return source->base_addr;
/* Allocate storage for the destination. */
- destptr = (GFC_COMPLEX_4 *)xmalloc (ssize * sizeof (GFC_COMPLEX_4));
+ destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_4));
dest = destptr;
src = source->base_addr;
stride0 = stride[0];
diff --git a/gcc-4.9/libgfortran/generated/in_pack_c8.c b/gcc-4.9/libgfortran/generated/in_pack_c8.c
index e63ea9d..995a367 100644
--- a/gcc-4.9/libgfortran/generated/in_pack_c8.c
+++ b/gcc-4.9/libgfortran/generated/in_pack_c8.c
@@ -76,7 +76,7 @@ internal_pack_c8 (gfc_array_c8 * source)
return source->base_addr;
/* Allocate storage for the destination. */
- destptr = (GFC_COMPLEX_8 *)xmalloc (ssize * sizeof (GFC_COMPLEX_8));
+ destptr = xmallocarray (ssize, sizeof (GFC_COMPLEX_8));
dest = destptr;
src = source->base_addr;
stride0 = stride[0];
diff --git a/gcc-4.9/libgfortran/generated/in_pack_i1.c b/gcc-4.9/libgfortran/generated/in_pack_i1.c
index 2356102..2ee5e28 100644
--- a/gcc-4.9/libgfortran/generated/in_pack_i1.c
+++ b/gcc-4.9/libgfortran/generated/in_pack_i1.c
@@ -76,7 +76,7 @@ internal_pack_1 (gfc_array_i1 * source)
return source->base_addr;
/* Allocate storage for the destination. */
- destptr = (GFC_INTEGER_1 *)xmalloc (ssize * sizeof (GFC_INTEGER_1));
+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_1));
dest = destptr;
src = source->base_addr;
stride0 = stride[0];
diff --git a/gcc-4.9/libgfortran/generated/in_pack_i16.c b/gcc-4.9/libgfortran/generated/in_pack_i16.c
index e271a89..ac6bb4f 100644
--- a/gcc-4.9/libgfortran/generated/in_pack_i16.c
+++ b/gcc-4.9/libgfortran/generated/in_pack_i16.c
@@ -76,7 +76,7 @@ internal_pack_16 (gfc_array_i16 * source)
return source->base_addr;
/* Allocate storage for the destination. */
- destptr = (GFC_INTEGER_16 *)xmalloc (ssize * sizeof (GFC_INTEGER_16));
+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_16));
dest = destptr;
src = source->base_addr;
stride0 = stride[0];
diff --git a/gcc-4.9/libgfortran/generated/in_pack_i2.c b/gcc-4.9/libgfortran/generated/in_pack_i2.c
index 391e27d..f42a892 100644
--- a/gcc-4.9/libgfortran/generated/in_pack_i2.c
+++ b/gcc-4.9/libgfortran/generated/in_pack_i2.c
@@ -76,7 +76,7 @@ internal_pack_2 (gfc_array_i2 * source)
return source->base_addr;
/* Allocate storage for the destination. */
- destptr = (GFC_INTEGER_2 *)xmalloc (ssize * sizeof (GFC_INTEGER_2));
+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_2));
dest = destptr;
src = source->base_addr;
stride0 = stride[0];
diff --git a/gcc-4.9/libgfortran/generated/in_pack_i4.c b/gcc-4.9/libgfortran/generated/in_pack_i4.c
index 6ba0277..acde25a 100644
--- a/gcc-4.9/libgfortran/generated/in_pack_i4.c
+++ b/gcc-4.9/libgfortran/generated/in_pack_i4.c
@@ -76,7 +76,7 @@ internal_pack_4 (gfc_array_i4 * source)
return source->base_addr;
/* Allocate storage for the destination. */
- destptr = (GFC_INTEGER_4 *)xmalloc (ssize * sizeof (GFC_INTEGER_4));
+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_4));
dest = destptr;
src = source->base_addr;
stride0 = stride[0];
diff --git a/gcc-4.9/libgfortran/generated/in_pack_i8.c b/gcc-4.9/libgfortran/generated/in_pack_i8.c
index 4c05043..5be3544 100644
--- a/gcc-4.9/libgfortran/generated/in_pack_i8.c
+++ b/gcc-4.9/libgfortran/generated/in_pack_i8.c
@@ -76,7 +76,7 @@ internal_pack_8 (gfc_array_i8 * source)
return source->base_addr;
/* Allocate storage for the destination. */
- destptr = (GFC_INTEGER_8 *)xmalloc (ssize * sizeof (GFC_INTEGER_8));
+ destptr = xmallocarray (ssize, sizeof (GFC_INTEGER_8));
dest = destptr;
src = source->base_addr;
stride0 = stride[0];
diff --git a/gcc-4.9/libgfortran/generated/in_pack_r10.c b/gcc-4.9/libgfortran/generated/in_pack_r10.c
index 75dec30..c4680d8 100644
--- a/gcc-4.9/libgfortran/generated/in_pack_r10.c
+++ b/gcc-4.9/libgfortran/generated/in_pack_r10.c
@@ -76,7 +76,7 @@ internal_pack_r10 (gfc_array_r10 * source)
return source->base_addr;
/* Allocate storage for the destination. */
- destptr = (GFC_REAL_10 *)xmalloc (ssize * sizeof (GFC_REAL_10));
+ destptr = xmallocarray (ssize, sizeof (GFC_REAL_10));
dest = destptr;
src = source->base_addr;
stride0 = stride[0];
diff --git a/gcc-4.9/libgfortran/generated/in_pack_r16.c b/gcc-4.9/libgfortran/generated/in_pack_r16.c
index a37623a..ff09d14 100644
--- a/gcc-4.9/libgfortran/generated/in_pack_r16.c
+++ b/gcc-4.9/libgfortran/generated/in_pack_r16.c
@@ -76,7 +76,7 @@ internal_pack_r16 (gfc_array_r16 * source)
return source->base_addr;
/* Allocate storage for the destination. */
- destptr = (GFC_REAL_16 *)xmalloc (ssize * sizeof (GFC_REAL_16));
+ destptr = xmallocarray (ssize, sizeof (GFC_REAL_16));
dest = destptr;
src = source->base_addr;
stride0 = stride[0];
diff --git a/gcc-4.9/libgfortran/generated/in_pack_r4.c b/gcc-4.9/libgfortran/generated/in_pack_r4.c
index 5a28ff0..34fe582 100644
--- a/gcc-4.9/libgfortran/generated/in_pack_r4.c
+++ b/gcc-4.9/libgfortran/generated/in_pack_r4.c
@@ -76,7 +76,7 @@ internal_pack_r4 (gfc_array_r4 * source)
return source->base_addr;
/* Allocate storage for the destination. */
- destptr = (GFC_REAL_4 *)xmalloc (ssize * sizeof (GFC_REAL_4));
+ destptr = xmallocarray (ssize, sizeof (GFC_REAL_4));
dest = destptr;
src = source->base_addr;
stride0 = stride[0];
diff --git a/gcc-4.9/libgfortran/generated/in_pack_r8.c b/gcc-4.9/libgfortran/generated/in_pack_r8.c
index 7c4fa42..b0728c9 100644
--- a/gcc-4.9/libgfortran/generated/in_pack_r8.c
+++ b/gcc-4.9/libgfortran/generated/in_pack_r8.c
@@ -76,7 +76,7 @@ internal_pack_r8 (gfc_array_r8 * source)
return source->base_addr;
/* Allocate storage for the destination. */
- destptr = (GFC_REAL_8 *)xmalloc (ssize * sizeof (GFC_REAL_8));
+ destptr = xmallocarray (ssize, sizeof (GFC_REAL_8));
dest = destptr;
src = source->base_addr;
stride0 = stride[0];
diff --git a/gcc-4.9/libgfortran/generated/iparity_i1.c b/gcc-4.9/libgfortran/generated/iparity_i1.c
index 9ccbd55..fdccc3d 100644
--- a/gcc-4.9/libgfortran/generated/iparity_i1.c
+++ b/gcc-4.9/libgfortran/generated/iparity_i1.c
@@ -97,10 +97,9 @@ iparity_i1 (gfc_array_i1 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -272,8 +271,7 @@ miparity_i1 (gfc_array_i1 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -285,7 +283,7 @@ miparity_i1 (gfc_array_i1 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
}
else
@@ -430,8 +428,7 @@ siparity_i1 (gfc_array_i1 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -440,7 +437,7 @@ siparity_i1 (gfc_array_i1 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/iparity_i16.c b/gcc-4.9/libgfortran/generated/iparity_i16.c
index 6a4d032..7a572ba 100644
--- a/gcc-4.9/libgfortran/generated/iparity_i16.c
+++ b/gcc-4.9/libgfortran/generated/iparity_i16.c
@@ -97,10 +97,9 @@ iparity_i16 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -272,8 +271,7 @@ miparity_i16 (gfc_array_i16 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -285,7 +283,7 @@ miparity_i16 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
@@ -430,8 +428,7 @@ siparity_i16 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -440,7 +437,7 @@ siparity_i16 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/iparity_i2.c b/gcc-4.9/libgfortran/generated/iparity_i2.c
index cb0d8a9..49233fb 100644
--- a/gcc-4.9/libgfortran/generated/iparity_i2.c
+++ b/gcc-4.9/libgfortran/generated/iparity_i2.c
@@ -97,10 +97,9 @@ iparity_i2 (gfc_array_i2 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -272,8 +271,7 @@ miparity_i2 (gfc_array_i2 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -285,7 +283,7 @@ miparity_i2 (gfc_array_i2 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
}
else
@@ -430,8 +428,7 @@ siparity_i2 (gfc_array_i2 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -440,7 +437,7 @@ siparity_i2 (gfc_array_i2 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/iparity_i4.c b/gcc-4.9/libgfortran/generated/iparity_i4.c
index 689f0c1..1551e51 100644
--- a/gcc-4.9/libgfortran/generated/iparity_i4.c
+++ b/gcc-4.9/libgfortran/generated/iparity_i4.c
@@ -97,10 +97,9 @@ iparity_i4 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -272,8 +271,7 @@ miparity_i4 (gfc_array_i4 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -285,7 +283,7 @@ miparity_i4 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
@@ -430,8 +428,7 @@ siparity_i4 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -440,7 +437,7 @@ siparity_i4 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/iparity_i8.c b/gcc-4.9/libgfortran/generated/iparity_i8.c
index de84f56..a745bb6 100644
--- a/gcc-4.9/libgfortran/generated/iparity_i8.c
+++ b/gcc-4.9/libgfortran/generated/iparity_i8.c
@@ -97,10 +97,9 @@ iparity_i8 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -272,8 +271,7 @@ miparity_i8 (gfc_array_i8 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -285,7 +283,7 @@ miparity_i8 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
@@ -430,8 +428,7 @@ siparity_i8 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -440,7 +437,7 @@ siparity_i8 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/matmul_c10.c b/gcc-4.9/libgfortran/generated/matmul_c10.c
index 53a8c6a..0ff7d58 100644
--- a/gcc-4.9/libgfortran/generated/matmul_c10.c
+++ b/gcc-4.9/libgfortran/generated/matmul_c10.c
@@ -124,7 +124,7 @@ matmul_c10 (gfc_array_c10 * const restrict retarray,
}
retarray->base_addr
- = xmalloc (sizeof (GFC_COMPLEX_10) * size0 ((array_t *) retarray));
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_10));
retarray->offset = 0;
}
else if (unlikely (compile_options.bounds_check))
diff --git a/gcc-4.9/libgfortran/generated/matmul_c16.c b/gcc-4.9/libgfortran/generated/matmul_c16.c
index 00ddc13..a5fea00 100644
--- a/gcc-4.9/libgfortran/generated/matmul_c16.c
+++ b/gcc-4.9/libgfortran/generated/matmul_c16.c
@@ -124,7 +124,7 @@ matmul_c16 (gfc_array_c16 * const restrict retarray,
}
retarray->base_addr
- = xmalloc (sizeof (GFC_COMPLEX_16) * size0 ((array_t *) retarray));
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_16));
retarray->offset = 0;
}
else if (unlikely (compile_options.bounds_check))
diff --git a/gcc-4.9/libgfortran/generated/matmul_c4.c b/gcc-4.9/libgfortran/generated/matmul_c4.c
index cdb92c4..b5b0ecb 100644
--- a/gcc-4.9/libgfortran/generated/matmul_c4.c
+++ b/gcc-4.9/libgfortran/generated/matmul_c4.c
@@ -124,7 +124,7 @@ matmul_c4 (gfc_array_c4 * const restrict retarray,
}
retarray->base_addr
- = xmalloc (sizeof (GFC_COMPLEX_4) * size0 ((array_t *) retarray));
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_4));
retarray->offset = 0;
}
else if (unlikely (compile_options.bounds_check))
diff --git a/gcc-4.9/libgfortran/generated/matmul_c8.c b/gcc-4.9/libgfortran/generated/matmul_c8.c
index 6a223d0..077b709 100644
--- a/gcc-4.9/libgfortran/generated/matmul_c8.c
+++ b/gcc-4.9/libgfortran/generated/matmul_c8.c
@@ -124,7 +124,7 @@ matmul_c8 (gfc_array_c8 * const restrict retarray,
}
retarray->base_addr
- = xmalloc (sizeof (GFC_COMPLEX_8) * size0 ((array_t *) retarray));
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_COMPLEX_8));
retarray->offset = 0;
}
else if (unlikely (compile_options.bounds_check))
diff --git a/gcc-4.9/libgfortran/generated/matmul_i1.c b/gcc-4.9/libgfortran/generated/matmul_i1.c
index bc24f11..72c998a 100644
--- a/gcc-4.9/libgfortran/generated/matmul_i1.c
+++ b/gcc-4.9/libgfortran/generated/matmul_i1.c
@@ -124,7 +124,7 @@ matmul_i1 (gfc_array_i1 * const restrict retarray,
}
retarray->base_addr
- = xmalloc (sizeof (GFC_INTEGER_1) * size0 ((array_t *) retarray));
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_1));
retarray->offset = 0;
}
else if (unlikely (compile_options.bounds_check))
diff --git a/gcc-4.9/libgfortran/generated/matmul_i16.c b/gcc-4.9/libgfortran/generated/matmul_i16.c
index 74fe262..59cd80b 100644
--- a/gcc-4.9/libgfortran/generated/matmul_i16.c
+++ b/gcc-4.9/libgfortran/generated/matmul_i16.c
@@ -124,7 +124,7 @@ matmul_i16 (gfc_array_i16 * const restrict retarray,
}
retarray->base_addr
- = xmalloc (sizeof (GFC_INTEGER_16) * size0 ((array_t *) retarray));
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_16));
retarray->offset = 0;
}
else if (unlikely (compile_options.bounds_check))
diff --git a/gcc-4.9/libgfortran/generated/matmul_i2.c b/gcc-4.9/libgfortran/generated/matmul_i2.c
index 8627361..6fddc4f 100644
--- a/gcc-4.9/libgfortran/generated/matmul_i2.c
+++ b/gcc-4.9/libgfortran/generated/matmul_i2.c
@@ -124,7 +124,7 @@ matmul_i2 (gfc_array_i2 * const restrict retarray,
}
retarray->base_addr
- = xmalloc (sizeof (GFC_INTEGER_2) * size0 ((array_t *) retarray));
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_2));
retarray->offset = 0;
}
else if (unlikely (compile_options.bounds_check))
diff --git a/gcc-4.9/libgfortran/generated/matmul_i4.c b/gcc-4.9/libgfortran/generated/matmul_i4.c
index 37e5d5b..f62cb56 100644
--- a/gcc-4.9/libgfortran/generated/matmul_i4.c
+++ b/gcc-4.9/libgfortran/generated/matmul_i4.c
@@ -124,7 +124,7 @@ matmul_i4 (gfc_array_i4 * const restrict retarray,
}
retarray->base_addr
- = xmalloc (sizeof (GFC_INTEGER_4) * size0 ((array_t *) retarray));
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_4));
retarray->offset = 0;
}
else if (unlikely (compile_options.bounds_check))
diff --git a/gcc-4.9/libgfortran/generated/matmul_i8.c b/gcc-4.9/libgfortran/generated/matmul_i8.c
index 892822a..6d52490 100644
--- a/gcc-4.9/libgfortran/generated/matmul_i8.c
+++ b/gcc-4.9/libgfortran/generated/matmul_i8.c
@@ -124,7 +124,7 @@ matmul_i8 (gfc_array_i8 * const restrict retarray,
}
retarray->base_addr
- = xmalloc (sizeof (GFC_INTEGER_8) * size0 ((array_t *) retarray));
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_INTEGER_8));
retarray->offset = 0;
}
else if (unlikely (compile_options.bounds_check))
diff --git a/gcc-4.9/libgfortran/generated/matmul_l16.c b/gcc-4.9/libgfortran/generated/matmul_l16.c
index bc60030..370db07 100644
--- a/gcc-4.9/libgfortran/generated/matmul_l16.c
+++ b/gcc-4.9/libgfortran/generated/matmul_l16.c
@@ -88,7 +88,7 @@ matmul_l16 (gfc_array_l16 * const restrict retarray,
}
retarray->base_addr
- = xmalloc (sizeof (GFC_LOGICAL_16) * size0 ((array_t *) retarray));
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_16));
retarray->offset = 0;
}
else if (unlikely (compile_options.bounds_check))
diff --git a/gcc-4.9/libgfortran/generated/matmul_l4.c b/gcc-4.9/libgfortran/generated/matmul_l4.c
index d464e62..d901e3c 100644
--- a/gcc-4.9/libgfortran/generated/matmul_l4.c
+++ b/gcc-4.9/libgfortran/generated/matmul_l4.c
@@ -88,7 +88,7 @@ matmul_l4 (gfc_array_l4 * const restrict retarray,
}
retarray->base_addr
- = xmalloc (sizeof (GFC_LOGICAL_4) * size0 ((array_t *) retarray));
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_4));
retarray->offset = 0;
}
else if (unlikely (compile_options.bounds_check))
diff --git a/gcc-4.9/libgfortran/generated/matmul_l8.c b/gcc-4.9/libgfortran/generated/matmul_l8.c
index 0fd6bad..5862c8d 100644
--- a/gcc-4.9/libgfortran/generated/matmul_l8.c
+++ b/gcc-4.9/libgfortran/generated/matmul_l8.c
@@ -88,7 +88,7 @@ matmul_l8 (gfc_array_l8 * const restrict retarray,
}
retarray->base_addr
- = xmalloc (sizeof (GFC_LOGICAL_8) * size0 ((array_t *) retarray));
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_LOGICAL_8));
retarray->offset = 0;
}
else if (unlikely (compile_options.bounds_check))
diff --git a/gcc-4.9/libgfortran/generated/matmul_r10.c b/gcc-4.9/libgfortran/generated/matmul_r10.c
index e222044..6c9656a 100644
--- a/gcc-4.9/libgfortran/generated/matmul_r10.c
+++ b/gcc-4.9/libgfortran/generated/matmul_r10.c
@@ -124,7 +124,7 @@ matmul_r10 (gfc_array_r10 * const restrict retarray,
}
retarray->base_addr
- = xmalloc (sizeof (GFC_REAL_10) * size0 ((array_t *) retarray));
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_10));
retarray->offset = 0;
}
else if (unlikely (compile_options.bounds_check))
diff --git a/gcc-4.9/libgfortran/generated/matmul_r16.c b/gcc-4.9/libgfortran/generated/matmul_r16.c
index 335feb0..fbe8e09 100644
--- a/gcc-4.9/libgfortran/generated/matmul_r16.c
+++ b/gcc-4.9/libgfortran/generated/matmul_r16.c
@@ -124,7 +124,7 @@ matmul_r16 (gfc_array_r16 * const restrict retarray,
}
retarray->base_addr
- = xmalloc (sizeof (GFC_REAL_16) * size0 ((array_t *) retarray));
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_16));
retarray->offset = 0;
}
else if (unlikely (compile_options.bounds_check))
diff --git a/gcc-4.9/libgfortran/generated/matmul_r4.c b/gcc-4.9/libgfortran/generated/matmul_r4.c
index bb07efa..f80c8bf 100644
--- a/gcc-4.9/libgfortran/generated/matmul_r4.c
+++ b/gcc-4.9/libgfortran/generated/matmul_r4.c
@@ -124,7 +124,7 @@ matmul_r4 (gfc_array_r4 * const restrict retarray,
}
retarray->base_addr
- = xmalloc (sizeof (GFC_REAL_4) * size0 ((array_t *) retarray));
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_4));
retarray->offset = 0;
}
else if (unlikely (compile_options.bounds_check))
diff --git a/gcc-4.9/libgfortran/generated/matmul_r8.c b/gcc-4.9/libgfortran/generated/matmul_r8.c
index a3bc842..7aec3b3 100644
--- a/gcc-4.9/libgfortran/generated/matmul_r8.c
+++ b/gcc-4.9/libgfortran/generated/matmul_r8.c
@@ -124,7 +124,7 @@ matmul_r8 (gfc_array_r8 * const restrict retarray,
}
retarray->base_addr
- = xmalloc (sizeof (GFC_REAL_8) * size0 ((array_t *) retarray));
+ = xmallocarray (size0 ((array_t *) retarray), sizeof (GFC_REAL_8));
retarray->offset = 0;
}
else if (unlikely (compile_options.bounds_check))
diff --git a/gcc-4.9/libgfortran/generated/maxloc0_16_i1.c b/gcc-4.9/libgfortran/generated/maxloc0_16_i1.c
index 01d6e77..d205d24 100644
--- a/gcc-4.9/libgfortran/generated/maxloc0_16_i1.c
+++ b/gcc-4.9/libgfortran/generated/maxloc0_16_i1.c
@@ -58,7 +58,7 @@ maxloc0_16_i1 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -199,7 +199,7 @@ mmaxloc0_16_i1 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -367,7 +367,7 @@ smaxloc0_16_i1 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc0_16_i16.c b/gcc-4.9/libgfortran/generated/maxloc0_16_i16.c
index c24b4be..3d8e3dc 100644
--- a/gcc-4.9/libgfortran/generated/maxloc0_16_i16.c
+++ b/gcc-4.9/libgfortran/generated/maxloc0_16_i16.c
@@ -58,7 +58,7 @@ maxloc0_16_i16 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -199,7 +199,7 @@ mmaxloc0_16_i16 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -367,7 +367,7 @@ smaxloc0_16_i16 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc0_16_i2.c b/gcc-4.9/libgfortran/generated/maxloc0_16_i2.c
index 1a0f2b6..93f5cc4 100644
--- a/gcc-4.9/libgfortran/generated/maxloc0_16_i2.c
+++ b/gcc-4.9/libgfortran/generated/maxloc0_16_i2.c
@@ -58,7 +58,7 @@ maxloc0_16_i2 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -199,7 +199,7 @@ mmaxloc0_16_i2 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -367,7 +367,7 @@ smaxloc0_16_i2 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc0_16_i4.c b/gcc-4.9/libgfortran/generated/maxloc0_16_i4.c
index 005a963..6858c8f 100644
--- a/gcc-4.9/libgfortran/generated/maxloc0_16_i4.c
+++ b/gcc-4.9/libgfortran/generated/maxloc0_16_i4.c
@@ -58,7 +58,7 @@ maxloc0_16_i4 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -199,7 +199,7 @@ mmaxloc0_16_i4 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -367,7 +367,7 @@ smaxloc0_16_i4 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc0_16_i8.c b/gcc-4.9/libgfortran/generated/maxloc0_16_i8.c
index 2643b82..f324b02 100644
--- a/gcc-4.9/libgfortran/generated/maxloc0_16_i8.c
+++ b/gcc-4.9/libgfortran/generated/maxloc0_16_i8.c
@@ -58,7 +58,7 @@ maxloc0_16_i8 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -199,7 +199,7 @@ mmaxloc0_16_i8 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -367,7 +367,7 @@ smaxloc0_16_i8 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc0_16_r10.c b/gcc-4.9/libgfortran/generated/maxloc0_16_r10.c
index 714a523..03560f7 100644
--- a/gcc-4.9/libgfortran/generated/maxloc0_16_r10.c
+++ b/gcc-4.9/libgfortran/generated/maxloc0_16_r10.c
@@ -58,7 +58,7 @@ maxloc0_16_r10 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -199,7 +199,7 @@ mmaxloc0_16_r10 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -367,7 +367,7 @@ smaxloc0_16_r10 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc0_16_r16.c b/gcc-4.9/libgfortran/generated/maxloc0_16_r16.c
index 5a2ecb3..aeb2e81 100644
--- a/gcc-4.9/libgfortran/generated/maxloc0_16_r16.c
+++ b/gcc-4.9/libgfortran/generated/maxloc0_16_r16.c
@@ -58,7 +58,7 @@ maxloc0_16_r16 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -199,7 +199,7 @@ mmaxloc0_16_r16 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -367,7 +367,7 @@ smaxloc0_16_r16 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc0_16_r4.c b/gcc-4.9/libgfortran/generated/maxloc0_16_r4.c
index 5556429..a88774e 100644
--- a/gcc-4.9/libgfortran/generated/maxloc0_16_r4.c
+++ b/gcc-4.9/libgfortran/generated/maxloc0_16_r4.c
@@ -58,7 +58,7 @@ maxloc0_16_r4 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -199,7 +199,7 @@ mmaxloc0_16_r4 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -367,7 +367,7 @@ smaxloc0_16_r4 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc0_16_r8.c b/gcc-4.9/libgfortran/generated/maxloc0_16_r8.c
index 2ae92c9..8704cad 100644
--- a/gcc-4.9/libgfortran/generated/maxloc0_16_r8.c
+++ b/gcc-4.9/libgfortran/generated/maxloc0_16_r8.c
@@ -58,7 +58,7 @@ maxloc0_16_r8 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -199,7 +199,7 @@ mmaxloc0_16_r8 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -367,7 +367,7 @@ smaxloc0_16_r8 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc0_4_i1.c b/gcc-4.9/libgfortran/generated/maxloc0_4_i1.c
index 2470b49..8e75ec9 100644
--- a/gcc-4.9/libgfortran/generated/maxloc0_4_i1.c
+++ b/gcc-4.9/libgfortran/generated/maxloc0_4_i1.c
@@ -58,7 +58,7 @@ maxloc0_4_i1 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -199,7 +199,7 @@ mmaxloc0_4_i1 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -367,7 +367,7 @@ smaxloc0_4_i1 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc0_4_i16.c b/gcc-4.9/libgfortran/generated/maxloc0_4_i16.c
index 850a26c..67383b6 100644
--- a/gcc-4.9/libgfortran/generated/maxloc0_4_i16.c
+++ b/gcc-4.9/libgfortran/generated/maxloc0_4_i16.c
@@ -58,7 +58,7 @@ maxloc0_4_i16 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -199,7 +199,7 @@ mmaxloc0_4_i16 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -367,7 +367,7 @@ smaxloc0_4_i16 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc0_4_i2.c b/gcc-4.9/libgfortran/generated/maxloc0_4_i2.c
index 8971519..3991bd6 100644
--- a/gcc-4.9/libgfortran/generated/maxloc0_4_i2.c
+++ b/gcc-4.9/libgfortran/generated/maxloc0_4_i2.c
@@ -58,7 +58,7 @@ maxloc0_4_i2 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -199,7 +199,7 @@ mmaxloc0_4_i2 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -367,7 +367,7 @@ smaxloc0_4_i2 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc0_4_i4.c b/gcc-4.9/libgfortran/generated/maxloc0_4_i4.c
index 9ad21d7..0a714c3 100644
--- a/gcc-4.9/libgfortran/generated/maxloc0_4_i4.c
+++ b/gcc-4.9/libgfortran/generated/maxloc0_4_i4.c
@@ -58,7 +58,7 @@ maxloc0_4_i4 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -199,7 +199,7 @@ mmaxloc0_4_i4 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -367,7 +367,7 @@ smaxloc0_4_i4 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc0_4_i8.c b/gcc-4.9/libgfortran/generated/maxloc0_4_i8.c
index 7e1e3a4..c32c6fb 100644
--- a/gcc-4.9/libgfortran/generated/maxloc0_4_i8.c
+++ b/gcc-4.9/libgfortran/generated/maxloc0_4_i8.c
@@ -58,7 +58,7 @@ maxloc0_4_i8 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -199,7 +199,7 @@ mmaxloc0_4_i8 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -367,7 +367,7 @@ smaxloc0_4_i8 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc0_4_r10.c b/gcc-4.9/libgfortran/generated/maxloc0_4_r10.c
index 4d1d980..d2d7f2e 100644
--- a/gcc-4.9/libgfortran/generated/maxloc0_4_r10.c
+++ b/gcc-4.9/libgfortran/generated/maxloc0_4_r10.c
@@ -58,7 +58,7 @@ maxloc0_4_r10 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -199,7 +199,7 @@ mmaxloc0_4_r10 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -367,7 +367,7 @@ smaxloc0_4_r10 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc0_4_r16.c b/gcc-4.9/libgfortran/generated/maxloc0_4_r16.c
index 0d37cda..e9d8620 100644
--- a/gcc-4.9/libgfortran/generated/maxloc0_4_r16.c
+++ b/gcc-4.9/libgfortran/generated/maxloc0_4_r16.c
@@ -58,7 +58,7 @@ maxloc0_4_r16 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -199,7 +199,7 @@ mmaxloc0_4_r16 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -367,7 +367,7 @@ smaxloc0_4_r16 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc0_4_r4.c b/gcc-4.9/libgfortran/generated/maxloc0_4_r4.c
index 6db50f8..c402868 100644
--- a/gcc-4.9/libgfortran/generated/maxloc0_4_r4.c
+++ b/gcc-4.9/libgfortran/generated/maxloc0_4_r4.c
@@ -58,7 +58,7 @@ maxloc0_4_r4 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -199,7 +199,7 @@ mmaxloc0_4_r4 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -367,7 +367,7 @@ smaxloc0_4_r4 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc0_4_r8.c b/gcc-4.9/libgfortran/generated/maxloc0_4_r8.c
index 610f757..5057e9c 100644
--- a/gcc-4.9/libgfortran/generated/maxloc0_4_r8.c
+++ b/gcc-4.9/libgfortran/generated/maxloc0_4_r8.c
@@ -58,7 +58,7 @@ maxloc0_4_r8 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -199,7 +199,7 @@ mmaxloc0_4_r8 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -367,7 +367,7 @@ smaxloc0_4_r8 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc0_8_i1.c b/gcc-4.9/libgfortran/generated/maxloc0_8_i1.c
index 6e1d049..95d027d 100644
--- a/gcc-4.9/libgfortran/generated/maxloc0_8_i1.c
+++ b/gcc-4.9/libgfortran/generated/maxloc0_8_i1.c
@@ -58,7 +58,7 @@ maxloc0_8_i1 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -199,7 +199,7 @@ mmaxloc0_8_i1 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -367,7 +367,7 @@ smaxloc0_8_i1 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc0_8_i16.c b/gcc-4.9/libgfortran/generated/maxloc0_8_i16.c
index aa2d6e3..1fa391b 100644
--- a/gcc-4.9/libgfortran/generated/maxloc0_8_i16.c
+++ b/gcc-4.9/libgfortran/generated/maxloc0_8_i16.c
@@ -58,7 +58,7 @@ maxloc0_8_i16 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -199,7 +199,7 @@ mmaxloc0_8_i16 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -367,7 +367,7 @@ smaxloc0_8_i16 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc0_8_i2.c b/gcc-4.9/libgfortran/generated/maxloc0_8_i2.c
index b9fd82b..d98a1a2 100644
--- a/gcc-4.9/libgfortran/generated/maxloc0_8_i2.c
+++ b/gcc-4.9/libgfortran/generated/maxloc0_8_i2.c
@@ -58,7 +58,7 @@ maxloc0_8_i2 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -199,7 +199,7 @@ mmaxloc0_8_i2 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -367,7 +367,7 @@ smaxloc0_8_i2 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc0_8_i4.c b/gcc-4.9/libgfortran/generated/maxloc0_8_i4.c
index 36bba3e..56a7748 100644
--- a/gcc-4.9/libgfortran/generated/maxloc0_8_i4.c
+++ b/gcc-4.9/libgfortran/generated/maxloc0_8_i4.c
@@ -58,7 +58,7 @@ maxloc0_8_i4 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -199,7 +199,7 @@ mmaxloc0_8_i4 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -367,7 +367,7 @@ smaxloc0_8_i4 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc0_8_i8.c b/gcc-4.9/libgfortran/generated/maxloc0_8_i8.c
index e808928..dd1fe2c 100644
--- a/gcc-4.9/libgfortran/generated/maxloc0_8_i8.c
+++ b/gcc-4.9/libgfortran/generated/maxloc0_8_i8.c
@@ -58,7 +58,7 @@ maxloc0_8_i8 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -199,7 +199,7 @@ mmaxloc0_8_i8 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -367,7 +367,7 @@ smaxloc0_8_i8 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc0_8_r10.c b/gcc-4.9/libgfortran/generated/maxloc0_8_r10.c
index fba75b9..2c8394c 100644
--- a/gcc-4.9/libgfortran/generated/maxloc0_8_r10.c
+++ b/gcc-4.9/libgfortran/generated/maxloc0_8_r10.c
@@ -58,7 +58,7 @@ maxloc0_8_r10 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -199,7 +199,7 @@ mmaxloc0_8_r10 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -367,7 +367,7 @@ smaxloc0_8_r10 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc0_8_r16.c b/gcc-4.9/libgfortran/generated/maxloc0_8_r16.c
index 24e317e..4ebf6f4 100644
--- a/gcc-4.9/libgfortran/generated/maxloc0_8_r16.c
+++ b/gcc-4.9/libgfortran/generated/maxloc0_8_r16.c
@@ -58,7 +58,7 @@ maxloc0_8_r16 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -199,7 +199,7 @@ mmaxloc0_8_r16 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -367,7 +367,7 @@ smaxloc0_8_r16 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc0_8_r4.c b/gcc-4.9/libgfortran/generated/maxloc0_8_r4.c
index 88dc2b2..893adad 100644
--- a/gcc-4.9/libgfortran/generated/maxloc0_8_r4.c
+++ b/gcc-4.9/libgfortran/generated/maxloc0_8_r4.c
@@ -58,7 +58,7 @@ maxloc0_8_r4 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -199,7 +199,7 @@ mmaxloc0_8_r4 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -367,7 +367,7 @@ smaxloc0_8_r4 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc0_8_r8.c b/gcc-4.9/libgfortran/generated/maxloc0_8_r8.c
index 23c1115..e234343 100644
--- a/gcc-4.9/libgfortran/generated/maxloc0_8_r8.c
+++ b/gcc-4.9/libgfortran/generated/maxloc0_8_r8.c
@@ -58,7 +58,7 @@ maxloc0_8_r8 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -199,7 +199,7 @@ mmaxloc0_8_r8 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -367,7 +367,7 @@ smaxloc0_8_r8 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc1_16_i1.c b/gcc-4.9/libgfortran/generated/maxloc1_16_i1.c
index 0602fc9..4d1bea0 100644
--- a/gcc-4.9/libgfortran/generated/maxloc1_16_i1.c
+++ b/gcc-4.9/libgfortran/generated/maxloc1_16_i1.c
@@ -98,10 +98,9 @@ maxloc1_16_i1 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mmaxloc1_16_i1 (gfc_array_i16 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mmaxloc1_16_i1 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
@@ -485,8 +483,7 @@ smaxloc1_16_i1 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ smaxloc1_16_i1 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc1_16_i16.c b/gcc-4.9/libgfortran/generated/maxloc1_16_i16.c
index 3f8c517..eb9b2a0 100644
--- a/gcc-4.9/libgfortran/generated/maxloc1_16_i16.c
+++ b/gcc-4.9/libgfortran/generated/maxloc1_16_i16.c
@@ -98,10 +98,9 @@ maxloc1_16_i16 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mmaxloc1_16_i16 (gfc_array_i16 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mmaxloc1_16_i16 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
@@ -485,8 +483,7 @@ smaxloc1_16_i16 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ smaxloc1_16_i16 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc1_16_i2.c b/gcc-4.9/libgfortran/generated/maxloc1_16_i2.c
index f284210..91a0800 100644
--- a/gcc-4.9/libgfortran/generated/maxloc1_16_i2.c
+++ b/gcc-4.9/libgfortran/generated/maxloc1_16_i2.c
@@ -98,10 +98,9 @@ maxloc1_16_i2 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mmaxloc1_16_i2 (gfc_array_i16 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mmaxloc1_16_i2 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
@@ -485,8 +483,7 @@ smaxloc1_16_i2 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ smaxloc1_16_i2 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc1_16_i4.c b/gcc-4.9/libgfortran/generated/maxloc1_16_i4.c
index 35fcc2a..c680351 100644
--- a/gcc-4.9/libgfortran/generated/maxloc1_16_i4.c
+++ b/gcc-4.9/libgfortran/generated/maxloc1_16_i4.c
@@ -98,10 +98,9 @@ maxloc1_16_i4 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mmaxloc1_16_i4 (gfc_array_i16 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mmaxloc1_16_i4 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
@@ -485,8 +483,7 @@ smaxloc1_16_i4 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ smaxloc1_16_i4 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc1_16_i8.c b/gcc-4.9/libgfortran/generated/maxloc1_16_i8.c
index b2c945c..ea164dc 100644
--- a/gcc-4.9/libgfortran/generated/maxloc1_16_i8.c
+++ b/gcc-4.9/libgfortran/generated/maxloc1_16_i8.c
@@ -98,10 +98,9 @@ maxloc1_16_i8 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mmaxloc1_16_i8 (gfc_array_i16 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mmaxloc1_16_i8 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
@@ -485,8 +483,7 @@ smaxloc1_16_i8 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ smaxloc1_16_i8 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc1_16_r10.c b/gcc-4.9/libgfortran/generated/maxloc1_16_r10.c
index d898dde..4d5ed45 100644
--- a/gcc-4.9/libgfortran/generated/maxloc1_16_r10.c
+++ b/gcc-4.9/libgfortran/generated/maxloc1_16_r10.c
@@ -98,10 +98,9 @@ maxloc1_16_r10 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mmaxloc1_16_r10 (gfc_array_i16 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mmaxloc1_16_r10 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
@@ -485,8 +483,7 @@ smaxloc1_16_r10 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ smaxloc1_16_r10 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc1_16_r16.c b/gcc-4.9/libgfortran/generated/maxloc1_16_r16.c
index 28e2db4..572d916 100644
--- a/gcc-4.9/libgfortran/generated/maxloc1_16_r16.c
+++ b/gcc-4.9/libgfortran/generated/maxloc1_16_r16.c
@@ -98,10 +98,9 @@ maxloc1_16_r16 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mmaxloc1_16_r16 (gfc_array_i16 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mmaxloc1_16_r16 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
@@ -485,8 +483,7 @@ smaxloc1_16_r16 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ smaxloc1_16_r16 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc1_16_r4.c b/gcc-4.9/libgfortran/generated/maxloc1_16_r4.c
index f7f85a7..d9aef3e 100644
--- a/gcc-4.9/libgfortran/generated/maxloc1_16_r4.c
+++ b/gcc-4.9/libgfortran/generated/maxloc1_16_r4.c
@@ -98,10 +98,9 @@ maxloc1_16_r4 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mmaxloc1_16_r4 (gfc_array_i16 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mmaxloc1_16_r4 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
@@ -485,8 +483,7 @@ smaxloc1_16_r4 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ smaxloc1_16_r4 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc1_16_r8.c b/gcc-4.9/libgfortran/generated/maxloc1_16_r8.c
index 69c82d3..d1014cd 100644
--- a/gcc-4.9/libgfortran/generated/maxloc1_16_r8.c
+++ b/gcc-4.9/libgfortran/generated/maxloc1_16_r8.c
@@ -98,10 +98,9 @@ maxloc1_16_r8 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mmaxloc1_16_r8 (gfc_array_i16 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mmaxloc1_16_r8 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
@@ -485,8 +483,7 @@ smaxloc1_16_r8 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ smaxloc1_16_r8 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc1_4_i1.c b/gcc-4.9/libgfortran/generated/maxloc1_4_i1.c
index fde1947..1ab44ab 100644
--- a/gcc-4.9/libgfortran/generated/maxloc1_4_i1.c
+++ b/gcc-4.9/libgfortran/generated/maxloc1_4_i1.c
@@ -98,10 +98,9 @@ maxloc1_4_i1 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mmaxloc1_4_i1 (gfc_array_i4 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mmaxloc1_4_i1 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
@@ -485,8 +483,7 @@ smaxloc1_4_i1 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ smaxloc1_4_i1 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc1_4_i16.c b/gcc-4.9/libgfortran/generated/maxloc1_4_i16.c
index c7b32b3..59bb2a3 100644
--- a/gcc-4.9/libgfortran/generated/maxloc1_4_i16.c
+++ b/gcc-4.9/libgfortran/generated/maxloc1_4_i16.c
@@ -98,10 +98,9 @@ maxloc1_4_i16 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mmaxloc1_4_i16 (gfc_array_i4 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mmaxloc1_4_i16 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
@@ -485,8 +483,7 @@ smaxloc1_4_i16 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ smaxloc1_4_i16 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc1_4_i2.c b/gcc-4.9/libgfortran/generated/maxloc1_4_i2.c
index 2a16a0b..794fde0 100644
--- a/gcc-4.9/libgfortran/generated/maxloc1_4_i2.c
+++ b/gcc-4.9/libgfortran/generated/maxloc1_4_i2.c
@@ -98,10 +98,9 @@ maxloc1_4_i2 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mmaxloc1_4_i2 (gfc_array_i4 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mmaxloc1_4_i2 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
@@ -485,8 +483,7 @@ smaxloc1_4_i2 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ smaxloc1_4_i2 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc1_4_i4.c b/gcc-4.9/libgfortran/generated/maxloc1_4_i4.c
index 7c693e1..d10e937 100644
--- a/gcc-4.9/libgfortran/generated/maxloc1_4_i4.c
+++ b/gcc-4.9/libgfortran/generated/maxloc1_4_i4.c
@@ -98,10 +98,9 @@ maxloc1_4_i4 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mmaxloc1_4_i4 (gfc_array_i4 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mmaxloc1_4_i4 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
@@ -485,8 +483,7 @@ smaxloc1_4_i4 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ smaxloc1_4_i4 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc1_4_i8.c b/gcc-4.9/libgfortran/generated/maxloc1_4_i8.c
index 45188e1..b761b82 100644
--- a/gcc-4.9/libgfortran/generated/maxloc1_4_i8.c
+++ b/gcc-4.9/libgfortran/generated/maxloc1_4_i8.c
@@ -98,10 +98,9 @@ maxloc1_4_i8 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mmaxloc1_4_i8 (gfc_array_i4 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mmaxloc1_4_i8 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
@@ -485,8 +483,7 @@ smaxloc1_4_i8 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ smaxloc1_4_i8 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc1_4_r10.c b/gcc-4.9/libgfortran/generated/maxloc1_4_r10.c
index bd0e0f8..f1d522d 100644
--- a/gcc-4.9/libgfortran/generated/maxloc1_4_r10.c
+++ b/gcc-4.9/libgfortran/generated/maxloc1_4_r10.c
@@ -98,10 +98,9 @@ maxloc1_4_r10 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mmaxloc1_4_r10 (gfc_array_i4 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mmaxloc1_4_r10 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
@@ -485,8 +483,7 @@ smaxloc1_4_r10 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ smaxloc1_4_r10 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc1_4_r16.c b/gcc-4.9/libgfortran/generated/maxloc1_4_r16.c
index 37428b2..deaf571 100644
--- a/gcc-4.9/libgfortran/generated/maxloc1_4_r16.c
+++ b/gcc-4.9/libgfortran/generated/maxloc1_4_r16.c
@@ -98,10 +98,9 @@ maxloc1_4_r16 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mmaxloc1_4_r16 (gfc_array_i4 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mmaxloc1_4_r16 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
@@ -485,8 +483,7 @@ smaxloc1_4_r16 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ smaxloc1_4_r16 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc1_4_r4.c b/gcc-4.9/libgfortran/generated/maxloc1_4_r4.c
index a42c7b4..bc64495 100644
--- a/gcc-4.9/libgfortran/generated/maxloc1_4_r4.c
+++ b/gcc-4.9/libgfortran/generated/maxloc1_4_r4.c
@@ -98,10 +98,9 @@ maxloc1_4_r4 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mmaxloc1_4_r4 (gfc_array_i4 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mmaxloc1_4_r4 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
@@ -485,8 +483,7 @@ smaxloc1_4_r4 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ smaxloc1_4_r4 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc1_4_r8.c b/gcc-4.9/libgfortran/generated/maxloc1_4_r8.c
index 85b7965..af09cb3 100644
--- a/gcc-4.9/libgfortran/generated/maxloc1_4_r8.c
+++ b/gcc-4.9/libgfortran/generated/maxloc1_4_r8.c
@@ -98,10 +98,9 @@ maxloc1_4_r8 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mmaxloc1_4_r8 (gfc_array_i4 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mmaxloc1_4_r8 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
@@ -485,8 +483,7 @@ smaxloc1_4_r8 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ smaxloc1_4_r8 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc1_8_i1.c b/gcc-4.9/libgfortran/generated/maxloc1_8_i1.c
index 4c5d55e..caaabe7 100644
--- a/gcc-4.9/libgfortran/generated/maxloc1_8_i1.c
+++ b/gcc-4.9/libgfortran/generated/maxloc1_8_i1.c
@@ -98,10 +98,9 @@ maxloc1_8_i1 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mmaxloc1_8_i1 (gfc_array_i8 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mmaxloc1_8_i1 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
@@ -485,8 +483,7 @@ smaxloc1_8_i1 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ smaxloc1_8_i1 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc1_8_i16.c b/gcc-4.9/libgfortran/generated/maxloc1_8_i16.c
index 6779d6a..384635c 100644
--- a/gcc-4.9/libgfortran/generated/maxloc1_8_i16.c
+++ b/gcc-4.9/libgfortran/generated/maxloc1_8_i16.c
@@ -98,10 +98,9 @@ maxloc1_8_i16 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mmaxloc1_8_i16 (gfc_array_i8 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mmaxloc1_8_i16 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
@@ -485,8 +483,7 @@ smaxloc1_8_i16 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ smaxloc1_8_i16 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc1_8_i2.c b/gcc-4.9/libgfortran/generated/maxloc1_8_i2.c
index 2fe5696..731c723 100644
--- a/gcc-4.9/libgfortran/generated/maxloc1_8_i2.c
+++ b/gcc-4.9/libgfortran/generated/maxloc1_8_i2.c
@@ -98,10 +98,9 @@ maxloc1_8_i2 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mmaxloc1_8_i2 (gfc_array_i8 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mmaxloc1_8_i2 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
@@ -485,8 +483,7 @@ smaxloc1_8_i2 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ smaxloc1_8_i2 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc1_8_i4.c b/gcc-4.9/libgfortran/generated/maxloc1_8_i4.c
index ae06e9e..26fdf83 100644
--- a/gcc-4.9/libgfortran/generated/maxloc1_8_i4.c
+++ b/gcc-4.9/libgfortran/generated/maxloc1_8_i4.c
@@ -98,10 +98,9 @@ maxloc1_8_i4 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mmaxloc1_8_i4 (gfc_array_i8 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mmaxloc1_8_i4 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
@@ -485,8 +483,7 @@ smaxloc1_8_i4 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ smaxloc1_8_i4 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc1_8_i8.c b/gcc-4.9/libgfortran/generated/maxloc1_8_i8.c
index d8d7b68..a7f43d1 100644
--- a/gcc-4.9/libgfortran/generated/maxloc1_8_i8.c
+++ b/gcc-4.9/libgfortran/generated/maxloc1_8_i8.c
@@ -98,10 +98,9 @@ maxloc1_8_i8 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mmaxloc1_8_i8 (gfc_array_i8 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mmaxloc1_8_i8 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
@@ -485,8 +483,7 @@ smaxloc1_8_i8 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ smaxloc1_8_i8 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc1_8_r10.c b/gcc-4.9/libgfortran/generated/maxloc1_8_r10.c
index 2b44cbb..f996db4 100644
--- a/gcc-4.9/libgfortran/generated/maxloc1_8_r10.c
+++ b/gcc-4.9/libgfortran/generated/maxloc1_8_r10.c
@@ -98,10 +98,9 @@ maxloc1_8_r10 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mmaxloc1_8_r10 (gfc_array_i8 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mmaxloc1_8_r10 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
@@ -485,8 +483,7 @@ smaxloc1_8_r10 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ smaxloc1_8_r10 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc1_8_r16.c b/gcc-4.9/libgfortran/generated/maxloc1_8_r16.c
index bcee801..d3ae5cb 100644
--- a/gcc-4.9/libgfortran/generated/maxloc1_8_r16.c
+++ b/gcc-4.9/libgfortran/generated/maxloc1_8_r16.c
@@ -98,10 +98,9 @@ maxloc1_8_r16 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mmaxloc1_8_r16 (gfc_array_i8 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mmaxloc1_8_r16 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
@@ -485,8 +483,7 @@ smaxloc1_8_r16 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ smaxloc1_8_r16 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc1_8_r4.c b/gcc-4.9/libgfortran/generated/maxloc1_8_r4.c
index 57a039d..c282cf7 100644
--- a/gcc-4.9/libgfortran/generated/maxloc1_8_r4.c
+++ b/gcc-4.9/libgfortran/generated/maxloc1_8_r4.c
@@ -98,10 +98,9 @@ maxloc1_8_r4 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mmaxloc1_8_r4 (gfc_array_i8 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mmaxloc1_8_r4 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
@@ -485,8 +483,7 @@ smaxloc1_8_r4 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ smaxloc1_8_r4 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxloc1_8_r8.c b/gcc-4.9/libgfortran/generated/maxloc1_8_r8.c
index c113680..13446e0 100644
--- a/gcc-4.9/libgfortran/generated/maxloc1_8_r8.c
+++ b/gcc-4.9/libgfortran/generated/maxloc1_8_r8.c
@@ -98,10 +98,9 @@ maxloc1_8_r8 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mmaxloc1_8_r8 (gfc_array_i8 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mmaxloc1_8_r8 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
@@ -485,8 +483,7 @@ smaxloc1_8_r8 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ smaxloc1_8_r8 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxval_i1.c b/gcc-4.9/libgfortran/generated/maxval_i1.c
index 18d4eff..eadec5c 100644
--- a/gcc-4.9/libgfortran/generated/maxval_i1.c
+++ b/gcc-4.9/libgfortran/generated/maxval_i1.c
@@ -97,10 +97,9 @@ maxval_i1 (gfc_array_i1 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -286,8 +285,7 @@ mmaxval_i1 (gfc_array_i1 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -299,7 +297,7 @@ mmaxval_i1 (gfc_array_i1 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
}
else
@@ -472,8 +470,7 @@ smaxval_i1 (gfc_array_i1 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -482,7 +479,7 @@ smaxval_i1 (gfc_array_i1 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxval_i16.c b/gcc-4.9/libgfortran/generated/maxval_i16.c
index 6815eb2..b83dd18 100644
--- a/gcc-4.9/libgfortran/generated/maxval_i16.c
+++ b/gcc-4.9/libgfortran/generated/maxval_i16.c
@@ -97,10 +97,9 @@ maxval_i16 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -286,8 +285,7 @@ mmaxval_i16 (gfc_array_i16 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -299,7 +297,7 @@ mmaxval_i16 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
@@ -472,8 +470,7 @@ smaxval_i16 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -482,7 +479,7 @@ smaxval_i16 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxval_i2.c b/gcc-4.9/libgfortran/generated/maxval_i2.c
index 5b99b34..72bb3b4 100644
--- a/gcc-4.9/libgfortran/generated/maxval_i2.c
+++ b/gcc-4.9/libgfortran/generated/maxval_i2.c
@@ -97,10 +97,9 @@ maxval_i2 (gfc_array_i2 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -286,8 +285,7 @@ mmaxval_i2 (gfc_array_i2 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -299,7 +297,7 @@ mmaxval_i2 (gfc_array_i2 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
}
else
@@ -472,8 +470,7 @@ smaxval_i2 (gfc_array_i2 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -482,7 +479,7 @@ smaxval_i2 (gfc_array_i2 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxval_i4.c b/gcc-4.9/libgfortran/generated/maxval_i4.c
index ff19f9c..c939a0a 100644
--- a/gcc-4.9/libgfortran/generated/maxval_i4.c
+++ b/gcc-4.9/libgfortran/generated/maxval_i4.c
@@ -97,10 +97,9 @@ maxval_i4 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -286,8 +285,7 @@ mmaxval_i4 (gfc_array_i4 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -299,7 +297,7 @@ mmaxval_i4 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
@@ -472,8 +470,7 @@ smaxval_i4 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -482,7 +479,7 @@ smaxval_i4 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxval_i8.c b/gcc-4.9/libgfortran/generated/maxval_i8.c
index d708c34..50ee398 100644
--- a/gcc-4.9/libgfortran/generated/maxval_i8.c
+++ b/gcc-4.9/libgfortran/generated/maxval_i8.c
@@ -97,10 +97,9 @@ maxval_i8 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -286,8 +285,7 @@ mmaxval_i8 (gfc_array_i8 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -299,7 +297,7 @@ mmaxval_i8 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
@@ -472,8 +470,7 @@ smaxval_i8 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -482,7 +479,7 @@ smaxval_i8 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxval_r10.c b/gcc-4.9/libgfortran/generated/maxval_r10.c
index 759198b..b16d263 100644
--- a/gcc-4.9/libgfortran/generated/maxval_r10.c
+++ b/gcc-4.9/libgfortran/generated/maxval_r10.c
@@ -97,10 +97,9 @@ maxval_r10 (gfc_array_r10 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -286,8 +285,7 @@ mmaxval_r10 (gfc_array_r10 * const restrict retarray,
}
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -299,7 +297,7 @@ mmaxval_r10 (gfc_array_r10 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
}
else
@@ -472,8 +470,7 @@ smaxval_r10 (gfc_array_r10 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -482,7 +479,7 @@ smaxval_r10 (gfc_array_r10 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxval_r16.c b/gcc-4.9/libgfortran/generated/maxval_r16.c
index b16c4cb..df6f2b0 100644
--- a/gcc-4.9/libgfortran/generated/maxval_r16.c
+++ b/gcc-4.9/libgfortran/generated/maxval_r16.c
@@ -97,10 +97,9 @@ maxval_r16 (gfc_array_r16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -286,8 +285,7 @@ mmaxval_r16 (gfc_array_r16 * const restrict retarray,
}
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -299,7 +297,7 @@ mmaxval_r16 (gfc_array_r16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
}
else
@@ -472,8 +470,7 @@ smaxval_r16 (gfc_array_r16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -482,7 +479,7 @@ smaxval_r16 (gfc_array_r16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxval_r4.c b/gcc-4.9/libgfortran/generated/maxval_r4.c
index db68885..edccaeb 100644
--- a/gcc-4.9/libgfortran/generated/maxval_r4.c
+++ b/gcc-4.9/libgfortran/generated/maxval_r4.c
@@ -97,10 +97,9 @@ maxval_r4 (gfc_array_r4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -286,8 +285,7 @@ mmaxval_r4 (gfc_array_r4 * const restrict retarray,
}
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -299,7 +297,7 @@ mmaxval_r4 (gfc_array_r4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
}
else
@@ -472,8 +470,7 @@ smaxval_r4 (gfc_array_r4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -482,7 +479,7 @@ smaxval_r4 (gfc_array_r4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/maxval_r8.c b/gcc-4.9/libgfortran/generated/maxval_r8.c
index ea0c8d8..bfbfa98 100644
--- a/gcc-4.9/libgfortran/generated/maxval_r8.c
+++ b/gcc-4.9/libgfortran/generated/maxval_r8.c
@@ -97,10 +97,9 @@ maxval_r8 (gfc_array_r8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -286,8 +285,7 @@ mmaxval_r8 (gfc_array_r8 * const restrict retarray,
}
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -299,7 +297,7 @@ mmaxval_r8 (gfc_array_r8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
}
else
@@ -472,8 +470,7 @@ smaxval_r8 (gfc_array_r8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -482,7 +479,7 @@ smaxval_r8 (gfc_array_r8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minloc0_16_i1.c b/gcc-4.9/libgfortran/generated/minloc0_16_i1.c
index f70d9ff..ccd89f0 100644
--- a/gcc-4.9/libgfortran/generated/minloc0_16_i1.c
+++ b/gcc-4.9/libgfortran/generated/minloc0_16_i1.c
@@ -58,7 +58,7 @@ minloc0_16_i1 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -199,7 +199,7 @@ mminloc0_16_i1 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -367,7 +367,7 @@ sminloc0_16_i1 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/minloc0_16_i16.c b/gcc-4.9/libgfortran/generated/minloc0_16_i16.c
index 7962415..65050b9 100644
--- a/gcc-4.9/libgfortran/generated/minloc0_16_i16.c
+++ b/gcc-4.9/libgfortran/generated/minloc0_16_i16.c
@@ -58,7 +58,7 @@ minloc0_16_i16 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -199,7 +199,7 @@ mminloc0_16_i16 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -367,7 +367,7 @@ sminloc0_16_i16 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/minloc0_16_i2.c b/gcc-4.9/libgfortran/generated/minloc0_16_i2.c
index e06f9f9..9fb6325 100644
--- a/gcc-4.9/libgfortran/generated/minloc0_16_i2.c
+++ b/gcc-4.9/libgfortran/generated/minloc0_16_i2.c
@@ -58,7 +58,7 @@ minloc0_16_i2 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -199,7 +199,7 @@ mminloc0_16_i2 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -367,7 +367,7 @@ sminloc0_16_i2 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/minloc0_16_i4.c b/gcc-4.9/libgfortran/generated/minloc0_16_i4.c
index 099ac7e..999ac4b 100644
--- a/gcc-4.9/libgfortran/generated/minloc0_16_i4.c
+++ b/gcc-4.9/libgfortran/generated/minloc0_16_i4.c
@@ -58,7 +58,7 @@ minloc0_16_i4 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -199,7 +199,7 @@ mminloc0_16_i4 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -367,7 +367,7 @@ sminloc0_16_i4 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/minloc0_16_i8.c b/gcc-4.9/libgfortran/generated/minloc0_16_i8.c
index 2361c85..3c2e3c3 100644
--- a/gcc-4.9/libgfortran/generated/minloc0_16_i8.c
+++ b/gcc-4.9/libgfortran/generated/minloc0_16_i8.c
@@ -58,7 +58,7 @@ minloc0_16_i8 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -199,7 +199,7 @@ mminloc0_16_i8 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -367,7 +367,7 @@ sminloc0_16_i8 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/minloc0_16_r10.c b/gcc-4.9/libgfortran/generated/minloc0_16_r10.c
index 9777ed1..c661cdc 100644
--- a/gcc-4.9/libgfortran/generated/minloc0_16_r10.c
+++ b/gcc-4.9/libgfortran/generated/minloc0_16_r10.c
@@ -58,7 +58,7 @@ minloc0_16_r10 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -199,7 +199,7 @@ mminloc0_16_r10 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -367,7 +367,7 @@ sminloc0_16_r10 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/minloc0_16_r16.c b/gcc-4.9/libgfortran/generated/minloc0_16_r16.c
index 6d3a349..c455e92 100644
--- a/gcc-4.9/libgfortran/generated/minloc0_16_r16.c
+++ b/gcc-4.9/libgfortran/generated/minloc0_16_r16.c
@@ -58,7 +58,7 @@ minloc0_16_r16 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -199,7 +199,7 @@ mminloc0_16_r16 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -367,7 +367,7 @@ sminloc0_16_r16 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/minloc0_16_r4.c b/gcc-4.9/libgfortran/generated/minloc0_16_r4.c
index 6db57e8..779935e 100644
--- a/gcc-4.9/libgfortran/generated/minloc0_16_r4.c
+++ b/gcc-4.9/libgfortran/generated/minloc0_16_r4.c
@@ -58,7 +58,7 @@ minloc0_16_r4 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -199,7 +199,7 @@ mminloc0_16_r4 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -367,7 +367,7 @@ sminloc0_16_r4 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/minloc0_16_r8.c b/gcc-4.9/libgfortran/generated/minloc0_16_r8.c
index 41e94b4..d902376 100644
--- a/gcc-4.9/libgfortran/generated/minloc0_16_r8.c
+++ b/gcc-4.9/libgfortran/generated/minloc0_16_r8.c
@@ -58,7 +58,7 @@ minloc0_16_r8 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -199,7 +199,7 @@ mminloc0_16_r8 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else
{
@@ -367,7 +367,7 @@ sminloc0_16_r8 (gfc_array_i16 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_16));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/minloc0_4_i1.c b/gcc-4.9/libgfortran/generated/minloc0_4_i1.c
index a2acfa9..a9e902d 100644
--- a/gcc-4.9/libgfortran/generated/minloc0_4_i1.c
+++ b/gcc-4.9/libgfortran/generated/minloc0_4_i1.c
@@ -58,7 +58,7 @@ minloc0_4_i1 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -199,7 +199,7 @@ mminloc0_4_i1 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -367,7 +367,7 @@ sminloc0_4_i1 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/minloc0_4_i16.c b/gcc-4.9/libgfortran/generated/minloc0_4_i16.c
index 9205254..7981c28 100644
--- a/gcc-4.9/libgfortran/generated/minloc0_4_i16.c
+++ b/gcc-4.9/libgfortran/generated/minloc0_4_i16.c
@@ -58,7 +58,7 @@ minloc0_4_i16 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -199,7 +199,7 @@ mminloc0_4_i16 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -367,7 +367,7 @@ sminloc0_4_i16 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/minloc0_4_i2.c b/gcc-4.9/libgfortran/generated/minloc0_4_i2.c
index 087e924..59439fa 100644
--- a/gcc-4.9/libgfortran/generated/minloc0_4_i2.c
+++ b/gcc-4.9/libgfortran/generated/minloc0_4_i2.c
@@ -58,7 +58,7 @@ minloc0_4_i2 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -199,7 +199,7 @@ mminloc0_4_i2 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -367,7 +367,7 @@ sminloc0_4_i2 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/minloc0_4_i4.c b/gcc-4.9/libgfortran/generated/minloc0_4_i4.c
index e8d43a8..5731a43 100644
--- a/gcc-4.9/libgfortran/generated/minloc0_4_i4.c
+++ b/gcc-4.9/libgfortran/generated/minloc0_4_i4.c
@@ -58,7 +58,7 @@ minloc0_4_i4 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -199,7 +199,7 @@ mminloc0_4_i4 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -367,7 +367,7 @@ sminloc0_4_i4 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/minloc0_4_i8.c b/gcc-4.9/libgfortran/generated/minloc0_4_i8.c
index d2c81e7..50b8e16 100644
--- a/gcc-4.9/libgfortran/generated/minloc0_4_i8.c
+++ b/gcc-4.9/libgfortran/generated/minloc0_4_i8.c
@@ -58,7 +58,7 @@ minloc0_4_i8 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -199,7 +199,7 @@ mminloc0_4_i8 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -367,7 +367,7 @@ sminloc0_4_i8 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/minloc0_4_r10.c b/gcc-4.9/libgfortran/generated/minloc0_4_r10.c
index 25c7c5a..2701a85 100644
--- a/gcc-4.9/libgfortran/generated/minloc0_4_r10.c
+++ b/gcc-4.9/libgfortran/generated/minloc0_4_r10.c
@@ -58,7 +58,7 @@ minloc0_4_r10 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -199,7 +199,7 @@ mminloc0_4_r10 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -367,7 +367,7 @@ sminloc0_4_r10 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/minloc0_4_r16.c b/gcc-4.9/libgfortran/generated/minloc0_4_r16.c
index c41a9f3..fca50b3 100644
--- a/gcc-4.9/libgfortran/generated/minloc0_4_r16.c
+++ b/gcc-4.9/libgfortran/generated/minloc0_4_r16.c
@@ -58,7 +58,7 @@ minloc0_4_r16 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -199,7 +199,7 @@ mminloc0_4_r16 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -367,7 +367,7 @@ sminloc0_4_r16 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/minloc0_4_r4.c b/gcc-4.9/libgfortran/generated/minloc0_4_r4.c
index 08f733f..0469a52 100644
--- a/gcc-4.9/libgfortran/generated/minloc0_4_r4.c
+++ b/gcc-4.9/libgfortran/generated/minloc0_4_r4.c
@@ -58,7 +58,7 @@ minloc0_4_r4 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -199,7 +199,7 @@ mminloc0_4_r4 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -367,7 +367,7 @@ sminloc0_4_r4 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/minloc0_4_r8.c b/gcc-4.9/libgfortran/generated/minloc0_4_r8.c
index 590138f..7be43c4 100644
--- a/gcc-4.9/libgfortran/generated/minloc0_4_r8.c
+++ b/gcc-4.9/libgfortran/generated/minloc0_4_r8.c
@@ -58,7 +58,7 @@ minloc0_4_r8 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -199,7 +199,7 @@ mminloc0_4_r8 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else
{
@@ -367,7 +367,7 @@ sminloc0_4_r8 (gfc_array_i4 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/minloc0_8_i1.c b/gcc-4.9/libgfortran/generated/minloc0_8_i1.c
index 2bce394..60bfe81 100644
--- a/gcc-4.9/libgfortran/generated/minloc0_8_i1.c
+++ b/gcc-4.9/libgfortran/generated/minloc0_8_i1.c
@@ -58,7 +58,7 @@ minloc0_8_i1 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -199,7 +199,7 @@ mminloc0_8_i1 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -367,7 +367,7 @@ sminloc0_8_i1 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/minloc0_8_i16.c b/gcc-4.9/libgfortran/generated/minloc0_8_i16.c
index 32a2b5a..27ddd4f 100644
--- a/gcc-4.9/libgfortran/generated/minloc0_8_i16.c
+++ b/gcc-4.9/libgfortran/generated/minloc0_8_i16.c
@@ -58,7 +58,7 @@ minloc0_8_i16 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -199,7 +199,7 @@ mminloc0_8_i16 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -367,7 +367,7 @@ sminloc0_8_i16 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/minloc0_8_i2.c b/gcc-4.9/libgfortran/generated/minloc0_8_i2.c
index a0061d2..38a4aa6 100644
--- a/gcc-4.9/libgfortran/generated/minloc0_8_i2.c
+++ b/gcc-4.9/libgfortran/generated/minloc0_8_i2.c
@@ -58,7 +58,7 @@ minloc0_8_i2 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -199,7 +199,7 @@ mminloc0_8_i2 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -367,7 +367,7 @@ sminloc0_8_i2 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/minloc0_8_i4.c b/gcc-4.9/libgfortran/generated/minloc0_8_i4.c
index 3ea2487..5586ea9 100644
--- a/gcc-4.9/libgfortran/generated/minloc0_8_i4.c
+++ b/gcc-4.9/libgfortran/generated/minloc0_8_i4.c
@@ -58,7 +58,7 @@ minloc0_8_i4 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -199,7 +199,7 @@ mminloc0_8_i4 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -367,7 +367,7 @@ sminloc0_8_i4 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/minloc0_8_i8.c b/gcc-4.9/libgfortran/generated/minloc0_8_i8.c
index afc6d44..1f21d26 100644
--- a/gcc-4.9/libgfortran/generated/minloc0_8_i8.c
+++ b/gcc-4.9/libgfortran/generated/minloc0_8_i8.c
@@ -58,7 +58,7 @@ minloc0_8_i8 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -199,7 +199,7 @@ mminloc0_8_i8 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -367,7 +367,7 @@ sminloc0_8_i8 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/minloc0_8_r10.c b/gcc-4.9/libgfortran/generated/minloc0_8_r10.c
index 6abc03d..df34ca3 100644
--- a/gcc-4.9/libgfortran/generated/minloc0_8_r10.c
+++ b/gcc-4.9/libgfortran/generated/minloc0_8_r10.c
@@ -58,7 +58,7 @@ minloc0_8_r10 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -199,7 +199,7 @@ mminloc0_8_r10 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -367,7 +367,7 @@ sminloc0_8_r10 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/minloc0_8_r16.c b/gcc-4.9/libgfortran/generated/minloc0_8_r16.c
index 322951e..d8769ec 100644
--- a/gcc-4.9/libgfortran/generated/minloc0_8_r16.c
+++ b/gcc-4.9/libgfortran/generated/minloc0_8_r16.c
@@ -58,7 +58,7 @@ minloc0_8_r16 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -199,7 +199,7 @@ mminloc0_8_r16 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -367,7 +367,7 @@ sminloc0_8_r16 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/minloc0_8_r4.c b/gcc-4.9/libgfortran/generated/minloc0_8_r4.c
index c9896d7..b8ab0c9 100644
--- a/gcc-4.9/libgfortran/generated/minloc0_8_r4.c
+++ b/gcc-4.9/libgfortran/generated/minloc0_8_r4.c
@@ -58,7 +58,7 @@ minloc0_8_r4 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -199,7 +199,7 @@ mminloc0_8_r4 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -367,7 +367,7 @@ sminloc0_8_r4 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/minloc0_8_r8.c b/gcc-4.9/libgfortran/generated/minloc0_8_r8.c
index edada90..ff67f1e 100644
--- a/gcc-4.9/libgfortran/generated/minloc0_8_r8.c
+++ b/gcc-4.9/libgfortran/generated/minloc0_8_r8.c
@@ -58,7 +58,7 @@ minloc0_8_r8 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -199,7 +199,7 @@ mminloc0_8_r8 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank - 1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else
{
@@ -367,7 +367,7 @@ sminloc0_8_r8 (gfc_array_i8 * const restrict retarray,
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype = (retarray->dtype & ~GFC_DTYPE_RANK_MASK) | 1;
retarray->offset = 0;
- retarray->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * rank);
+ retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_8));
}
else if (unlikely (compile_options.bounds_check))
{
diff --git a/gcc-4.9/libgfortran/generated/minloc1_16_i1.c b/gcc-4.9/libgfortran/generated/minloc1_16_i1.c
index d47e946..a9b2d96 100644
--- a/gcc-4.9/libgfortran/generated/minloc1_16_i1.c
+++ b/gcc-4.9/libgfortran/generated/minloc1_16_i1.c
@@ -98,10 +98,9 @@ minloc1_16_i1 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mminloc1_16_i1 (gfc_array_i16 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mminloc1_16_i1 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
@@ -485,8 +483,7 @@ sminloc1_16_i1 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ sminloc1_16_i1 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minloc1_16_i16.c b/gcc-4.9/libgfortran/generated/minloc1_16_i16.c
index aca08c0..1e52c22 100644
--- a/gcc-4.9/libgfortran/generated/minloc1_16_i16.c
+++ b/gcc-4.9/libgfortran/generated/minloc1_16_i16.c
@@ -98,10 +98,9 @@ minloc1_16_i16 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mminloc1_16_i16 (gfc_array_i16 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mminloc1_16_i16 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
@@ -485,8 +483,7 @@ sminloc1_16_i16 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ sminloc1_16_i16 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minloc1_16_i2.c b/gcc-4.9/libgfortran/generated/minloc1_16_i2.c
index 27eb379..7617b9e 100644
--- a/gcc-4.9/libgfortran/generated/minloc1_16_i2.c
+++ b/gcc-4.9/libgfortran/generated/minloc1_16_i2.c
@@ -98,10 +98,9 @@ minloc1_16_i2 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mminloc1_16_i2 (gfc_array_i16 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mminloc1_16_i2 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
@@ -485,8 +483,7 @@ sminloc1_16_i2 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ sminloc1_16_i2 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minloc1_16_i4.c b/gcc-4.9/libgfortran/generated/minloc1_16_i4.c
index 4a30ac1..9729d11 100644
--- a/gcc-4.9/libgfortran/generated/minloc1_16_i4.c
+++ b/gcc-4.9/libgfortran/generated/minloc1_16_i4.c
@@ -98,10 +98,9 @@ minloc1_16_i4 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mminloc1_16_i4 (gfc_array_i16 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mminloc1_16_i4 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
@@ -485,8 +483,7 @@ sminloc1_16_i4 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ sminloc1_16_i4 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minloc1_16_i8.c b/gcc-4.9/libgfortran/generated/minloc1_16_i8.c
index 4021ac2..00421b2 100644
--- a/gcc-4.9/libgfortran/generated/minloc1_16_i8.c
+++ b/gcc-4.9/libgfortran/generated/minloc1_16_i8.c
@@ -98,10 +98,9 @@ minloc1_16_i8 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mminloc1_16_i8 (gfc_array_i16 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mminloc1_16_i8 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
@@ -485,8 +483,7 @@ sminloc1_16_i8 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ sminloc1_16_i8 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minloc1_16_r10.c b/gcc-4.9/libgfortran/generated/minloc1_16_r10.c
index c8eadc3..fb1401b 100644
--- a/gcc-4.9/libgfortran/generated/minloc1_16_r10.c
+++ b/gcc-4.9/libgfortran/generated/minloc1_16_r10.c
@@ -98,10 +98,9 @@ minloc1_16_r10 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mminloc1_16_r10 (gfc_array_i16 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mminloc1_16_r10 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
@@ -485,8 +483,7 @@ sminloc1_16_r10 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ sminloc1_16_r10 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minloc1_16_r16.c b/gcc-4.9/libgfortran/generated/minloc1_16_r16.c
index 6aa1de8..0312868 100644
--- a/gcc-4.9/libgfortran/generated/minloc1_16_r16.c
+++ b/gcc-4.9/libgfortran/generated/minloc1_16_r16.c
@@ -98,10 +98,9 @@ minloc1_16_r16 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mminloc1_16_r16 (gfc_array_i16 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mminloc1_16_r16 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
@@ -485,8 +483,7 @@ sminloc1_16_r16 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ sminloc1_16_r16 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minloc1_16_r4.c b/gcc-4.9/libgfortran/generated/minloc1_16_r4.c
index 67e5564..af5b67d 100644
--- a/gcc-4.9/libgfortran/generated/minloc1_16_r4.c
+++ b/gcc-4.9/libgfortran/generated/minloc1_16_r4.c
@@ -98,10 +98,9 @@ minloc1_16_r4 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mminloc1_16_r4 (gfc_array_i16 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mminloc1_16_r4 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
@@ -485,8 +483,7 @@ sminloc1_16_r4 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ sminloc1_16_r4 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minloc1_16_r8.c b/gcc-4.9/libgfortran/generated/minloc1_16_r8.c
index 1fcef6c..dd2be3b 100644
--- a/gcc-4.9/libgfortran/generated/minloc1_16_r8.c
+++ b/gcc-4.9/libgfortran/generated/minloc1_16_r8.c
@@ -98,10 +98,9 @@ minloc1_16_r8 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mminloc1_16_r8 (gfc_array_i16 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mminloc1_16_r8 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
@@ -485,8 +483,7 @@ sminloc1_16_r8 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ sminloc1_16_r8 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minloc1_4_i1.c b/gcc-4.9/libgfortran/generated/minloc1_4_i1.c
index 863f873..b0bf6ef 100644
--- a/gcc-4.9/libgfortran/generated/minloc1_4_i1.c
+++ b/gcc-4.9/libgfortran/generated/minloc1_4_i1.c
@@ -98,10 +98,9 @@ minloc1_4_i1 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mminloc1_4_i1 (gfc_array_i4 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mminloc1_4_i1 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
@@ -485,8 +483,7 @@ sminloc1_4_i1 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ sminloc1_4_i1 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minloc1_4_i16.c b/gcc-4.9/libgfortran/generated/minloc1_4_i16.c
index 9a81558..882b4b4 100644
--- a/gcc-4.9/libgfortran/generated/minloc1_4_i16.c
+++ b/gcc-4.9/libgfortran/generated/minloc1_4_i16.c
@@ -98,10 +98,9 @@ minloc1_4_i16 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mminloc1_4_i16 (gfc_array_i4 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mminloc1_4_i16 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
@@ -485,8 +483,7 @@ sminloc1_4_i16 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ sminloc1_4_i16 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minloc1_4_i2.c b/gcc-4.9/libgfortran/generated/minloc1_4_i2.c
index 6657c9f..877af7a 100644
--- a/gcc-4.9/libgfortran/generated/minloc1_4_i2.c
+++ b/gcc-4.9/libgfortran/generated/minloc1_4_i2.c
@@ -98,10 +98,9 @@ minloc1_4_i2 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mminloc1_4_i2 (gfc_array_i4 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mminloc1_4_i2 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
@@ -485,8 +483,7 @@ sminloc1_4_i2 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ sminloc1_4_i2 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minloc1_4_i4.c b/gcc-4.9/libgfortran/generated/minloc1_4_i4.c
index 36e9552..3a87270 100644
--- a/gcc-4.9/libgfortran/generated/minloc1_4_i4.c
+++ b/gcc-4.9/libgfortran/generated/minloc1_4_i4.c
@@ -98,10 +98,9 @@ minloc1_4_i4 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mminloc1_4_i4 (gfc_array_i4 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mminloc1_4_i4 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
@@ -485,8 +483,7 @@ sminloc1_4_i4 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ sminloc1_4_i4 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minloc1_4_i8.c b/gcc-4.9/libgfortran/generated/minloc1_4_i8.c
index c5d7828..22e43bf 100644
--- a/gcc-4.9/libgfortran/generated/minloc1_4_i8.c
+++ b/gcc-4.9/libgfortran/generated/minloc1_4_i8.c
@@ -98,10 +98,9 @@ minloc1_4_i8 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mminloc1_4_i8 (gfc_array_i4 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mminloc1_4_i8 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
@@ -485,8 +483,7 @@ sminloc1_4_i8 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ sminloc1_4_i8 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minloc1_4_r10.c b/gcc-4.9/libgfortran/generated/minloc1_4_r10.c
index f55791c..624006c 100644
--- a/gcc-4.9/libgfortran/generated/minloc1_4_r10.c
+++ b/gcc-4.9/libgfortran/generated/minloc1_4_r10.c
@@ -98,10 +98,9 @@ minloc1_4_r10 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mminloc1_4_r10 (gfc_array_i4 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mminloc1_4_r10 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
@@ -485,8 +483,7 @@ sminloc1_4_r10 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ sminloc1_4_r10 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minloc1_4_r16.c b/gcc-4.9/libgfortran/generated/minloc1_4_r16.c
index 99163f4..f32b608 100644
--- a/gcc-4.9/libgfortran/generated/minloc1_4_r16.c
+++ b/gcc-4.9/libgfortran/generated/minloc1_4_r16.c
@@ -98,10 +98,9 @@ minloc1_4_r16 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mminloc1_4_r16 (gfc_array_i4 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mminloc1_4_r16 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
@@ -485,8 +483,7 @@ sminloc1_4_r16 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ sminloc1_4_r16 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minloc1_4_r4.c b/gcc-4.9/libgfortran/generated/minloc1_4_r4.c
index 9e85745..0ed5fe9 100644
--- a/gcc-4.9/libgfortran/generated/minloc1_4_r4.c
+++ b/gcc-4.9/libgfortran/generated/minloc1_4_r4.c
@@ -98,10 +98,9 @@ minloc1_4_r4 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mminloc1_4_r4 (gfc_array_i4 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mminloc1_4_r4 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
@@ -485,8 +483,7 @@ sminloc1_4_r4 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ sminloc1_4_r4 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minloc1_4_r8.c b/gcc-4.9/libgfortran/generated/minloc1_4_r8.c
index 75f2a5f..c780a42 100644
--- a/gcc-4.9/libgfortran/generated/minloc1_4_r8.c
+++ b/gcc-4.9/libgfortran/generated/minloc1_4_r8.c
@@ -98,10 +98,9 @@ minloc1_4_r8 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mminloc1_4_r8 (gfc_array_i4 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mminloc1_4_r8 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
@@ -485,8 +483,7 @@ sminloc1_4_r8 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ sminloc1_4_r8 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minloc1_8_i1.c b/gcc-4.9/libgfortran/generated/minloc1_8_i1.c
index 8c065ec..6f8c7d9 100644
--- a/gcc-4.9/libgfortran/generated/minloc1_8_i1.c
+++ b/gcc-4.9/libgfortran/generated/minloc1_8_i1.c
@@ -98,10 +98,9 @@ minloc1_8_i1 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mminloc1_8_i1 (gfc_array_i8 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mminloc1_8_i1 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
@@ -485,8 +483,7 @@ sminloc1_8_i1 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ sminloc1_8_i1 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minloc1_8_i16.c b/gcc-4.9/libgfortran/generated/minloc1_8_i16.c
index 68c9617..07cb011 100644
--- a/gcc-4.9/libgfortran/generated/minloc1_8_i16.c
+++ b/gcc-4.9/libgfortran/generated/minloc1_8_i16.c
@@ -98,10 +98,9 @@ minloc1_8_i16 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mminloc1_8_i16 (gfc_array_i8 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mminloc1_8_i16 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
@@ -485,8 +483,7 @@ sminloc1_8_i16 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ sminloc1_8_i16 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minloc1_8_i2.c b/gcc-4.9/libgfortran/generated/minloc1_8_i2.c
index 3e4f4f0..9ea0bf4 100644
--- a/gcc-4.9/libgfortran/generated/minloc1_8_i2.c
+++ b/gcc-4.9/libgfortran/generated/minloc1_8_i2.c
@@ -98,10 +98,9 @@ minloc1_8_i2 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mminloc1_8_i2 (gfc_array_i8 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mminloc1_8_i2 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
@@ -485,8 +483,7 @@ sminloc1_8_i2 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ sminloc1_8_i2 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minloc1_8_i4.c b/gcc-4.9/libgfortran/generated/minloc1_8_i4.c
index b0e753a..5e433cc 100644
--- a/gcc-4.9/libgfortran/generated/minloc1_8_i4.c
+++ b/gcc-4.9/libgfortran/generated/minloc1_8_i4.c
@@ -98,10 +98,9 @@ minloc1_8_i4 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mminloc1_8_i4 (gfc_array_i8 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mminloc1_8_i4 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
@@ -485,8 +483,7 @@ sminloc1_8_i4 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ sminloc1_8_i4 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minloc1_8_i8.c b/gcc-4.9/libgfortran/generated/minloc1_8_i8.c
index a7fec90..364cf32 100644
--- a/gcc-4.9/libgfortran/generated/minloc1_8_i8.c
+++ b/gcc-4.9/libgfortran/generated/minloc1_8_i8.c
@@ -98,10 +98,9 @@ minloc1_8_i8 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mminloc1_8_i8 (gfc_array_i8 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mminloc1_8_i8 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
@@ -485,8 +483,7 @@ sminloc1_8_i8 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ sminloc1_8_i8 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minloc1_8_r10.c b/gcc-4.9/libgfortran/generated/minloc1_8_r10.c
index 6b3e80f..901cf91 100644
--- a/gcc-4.9/libgfortran/generated/minloc1_8_r10.c
+++ b/gcc-4.9/libgfortran/generated/minloc1_8_r10.c
@@ -98,10 +98,9 @@ minloc1_8_r10 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mminloc1_8_r10 (gfc_array_i8 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mminloc1_8_r10 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
@@ -485,8 +483,7 @@ sminloc1_8_r10 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ sminloc1_8_r10 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minloc1_8_r16.c b/gcc-4.9/libgfortran/generated/minloc1_8_r16.c
index 7b69876..7bf17ea 100644
--- a/gcc-4.9/libgfortran/generated/minloc1_8_r16.c
+++ b/gcc-4.9/libgfortran/generated/minloc1_8_r16.c
@@ -98,10 +98,9 @@ minloc1_8_r16 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mminloc1_8_r16 (gfc_array_i8 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mminloc1_8_r16 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
@@ -485,8 +483,7 @@ sminloc1_8_r16 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ sminloc1_8_r16 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minloc1_8_r4.c b/gcc-4.9/libgfortran/generated/minloc1_8_r4.c
index 13d40ea..5edb92f 100644
--- a/gcc-4.9/libgfortran/generated/minloc1_8_r4.c
+++ b/gcc-4.9/libgfortran/generated/minloc1_8_r4.c
@@ -98,10 +98,9 @@ minloc1_8_r4 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mminloc1_8_r4 (gfc_array_i8 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mminloc1_8_r4 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
@@ -485,8 +483,7 @@ sminloc1_8_r4 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ sminloc1_8_r4 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minloc1_8_r8.c b/gcc-4.9/libgfortran/generated/minloc1_8_r8.c
index 51151f2..405b9e1 100644
--- a/gcc-4.9/libgfortran/generated/minloc1_8_r8.c
+++ b/gcc-4.9/libgfortran/generated/minloc1_8_r8.c
@@ -98,10 +98,9 @@ minloc1_8_r8 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -294,8 +293,7 @@ mminloc1_8_r8 (gfc_array_i8 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -307,7 +305,7 @@ mminloc1_8_r8 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
@@ -485,8 +483,7 @@ sminloc1_8_r8 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -495,7 +492,7 @@ sminloc1_8_r8 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minval_i1.c b/gcc-4.9/libgfortran/generated/minval_i1.c
index 261dac8..da7405b 100644
--- a/gcc-4.9/libgfortran/generated/minval_i1.c
+++ b/gcc-4.9/libgfortran/generated/minval_i1.c
@@ -97,10 +97,9 @@ minval_i1 (gfc_array_i1 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -286,8 +285,7 @@ mminval_i1 (gfc_array_i1 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -299,7 +297,7 @@ mminval_i1 (gfc_array_i1 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
}
else
@@ -472,8 +470,7 @@ sminval_i1 (gfc_array_i1 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -482,7 +479,7 @@ sminval_i1 (gfc_array_i1 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_1));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minval_i16.c b/gcc-4.9/libgfortran/generated/minval_i16.c
index c75db96..11cbeac 100644
--- a/gcc-4.9/libgfortran/generated/minval_i16.c
+++ b/gcc-4.9/libgfortran/generated/minval_i16.c
@@ -97,10 +97,9 @@ minval_i16 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -286,8 +285,7 @@ mminval_i16 (gfc_array_i16 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -299,7 +297,7 @@ mminval_i16 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
@@ -472,8 +470,7 @@ sminval_i16 (gfc_array_i16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -482,7 +479,7 @@ sminval_i16 (gfc_array_i16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_16));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minval_i2.c b/gcc-4.9/libgfortran/generated/minval_i2.c
index 5e7a364..e208b57 100644
--- a/gcc-4.9/libgfortran/generated/minval_i2.c
+++ b/gcc-4.9/libgfortran/generated/minval_i2.c
@@ -97,10 +97,9 @@ minval_i2 (gfc_array_i2 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -286,8 +285,7 @@ mminval_i2 (gfc_array_i2 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -299,7 +297,7 @@ mminval_i2 (gfc_array_i2 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
}
else
@@ -472,8 +470,7 @@ sminval_i2 (gfc_array_i2 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -482,7 +479,7 @@ sminval_i2 (gfc_array_i2 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_2));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minval_i4.c b/gcc-4.9/libgfortran/generated/minval_i4.c
index a8aed7d..68ba76e 100644
--- a/gcc-4.9/libgfortran/generated/minval_i4.c
+++ b/gcc-4.9/libgfortran/generated/minval_i4.c
@@ -97,10 +97,9 @@ minval_i4 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -286,8 +285,7 @@ mminval_i4 (gfc_array_i4 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -299,7 +297,7 @@ mminval_i4 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
@@ -472,8 +470,7 @@ sminval_i4 (gfc_array_i4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -482,7 +479,7 @@ sminval_i4 (gfc_array_i4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_4));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minval_i8.c b/gcc-4.9/libgfortran/generated/minval_i8.c
index 1d489bc..b089358 100644
--- a/gcc-4.9/libgfortran/generated/minval_i8.c
+++ b/gcc-4.9/libgfortran/generated/minval_i8.c
@@ -97,10 +97,9 @@ minval_i8 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -286,8 +285,7 @@ mminval_i8 (gfc_array_i8 * const restrict retarray,
}
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -299,7 +297,7 @@ mminval_i8 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
@@ -472,8 +470,7 @@ sminval_i8 (gfc_array_i8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_INTEGER_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -482,7 +479,7 @@ sminval_i8 (gfc_array_i8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_INTEGER_8));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minval_r10.c b/gcc-4.9/libgfortran/generated/minval_r10.c
index 9181e21..e9e6afe 100644
--- a/gcc-4.9/libgfortran/generated/minval_r10.c
+++ b/gcc-4.9/libgfortran/generated/minval_r10.c
@@ -97,10 +97,9 @@ minval_r10 (gfc_array_r10 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -286,8 +285,7 @@ mminval_r10 (gfc_array_r10 * const restrict retarray,
}
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -299,7 +297,7 @@ mminval_r10 (gfc_array_r10 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
}
else
@@ -472,8 +470,7 @@ sminval_r10 (gfc_array_r10 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -482,7 +479,7 @@ sminval_r10 (gfc_array_r10 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minval_r16.c b/gcc-4.9/libgfortran/generated/minval_r16.c
index 85aaa5d..e4e3827 100644
--- a/gcc-4.9/libgfortran/generated/minval_r16.c
+++ b/gcc-4.9/libgfortran/generated/minval_r16.c
@@ -97,10 +97,9 @@ minval_r16 (gfc_array_r16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -286,8 +285,7 @@ mminval_r16 (gfc_array_r16 * const restrict retarray,
}
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -299,7 +297,7 @@ mminval_r16 (gfc_array_r16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
}
else
@@ -472,8 +470,7 @@ sminval_r16 (gfc_array_r16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -482,7 +479,7 @@ sminval_r16 (gfc_array_r16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minval_r4.c b/gcc-4.9/libgfortran/generated/minval_r4.c
index 19a258c..515b2db 100644
--- a/gcc-4.9/libgfortran/generated/minval_r4.c
+++ b/gcc-4.9/libgfortran/generated/minval_r4.c
@@ -97,10 +97,9 @@ minval_r4 (gfc_array_r4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -286,8 +285,7 @@ mminval_r4 (gfc_array_r4 * const restrict retarray,
}
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -299,7 +297,7 @@ mminval_r4 (gfc_array_r4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
}
else
@@ -472,8 +470,7 @@ sminval_r4 (gfc_array_r4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -482,7 +479,7 @@ sminval_r4 (gfc_array_r4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/minval_r8.c b/gcc-4.9/libgfortran/generated/minval_r8.c
index d2f9639..c61656f 100644
--- a/gcc-4.9/libgfortran/generated/minval_r8.c
+++ b/gcc-4.9/libgfortran/generated/minval_r8.c
@@ -97,10 +97,9 @@ minval_r8 (gfc_array_r8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -286,8 +285,7 @@ mminval_r8 (gfc_array_r8 * const restrict retarray,
}
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -299,7 +297,7 @@ mminval_r8 (gfc_array_r8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
}
else
@@ -472,8 +470,7 @@ sminval_r8 (gfc_array_r8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -482,7 +479,7 @@ sminval_r8 (gfc_array_r8 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/norm2_r10.c b/gcc-4.9/libgfortran/generated/norm2_r10.c
index 44028cc..0145c99 100644
--- a/gcc-4.9/libgfortran/generated/norm2_r10.c
+++ b/gcc-4.9/libgfortran/generated/norm2_r10.c
@@ -101,10 +101,9 @@ norm2_r10 (gfc_array_r10 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_REAL_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_10));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
diff --git a/gcc-4.9/libgfortran/generated/norm2_r16.c b/gcc-4.9/libgfortran/generated/norm2_r16.c
index c036edc..46329d5 100644
--- a/gcc-4.9/libgfortran/generated/norm2_r16.c
+++ b/gcc-4.9/libgfortran/generated/norm2_r16.c
@@ -105,10 +105,9 @@ norm2_r16 (gfc_array_r16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_REAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_16));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
diff --git a/gcc-4.9/libgfortran/generated/norm2_r4.c b/gcc-4.9/libgfortran/generated/norm2_r4.c
index dcf78da..067dbee 100644
--- a/gcc-4.9/libgfortran/generated/norm2_r4.c
+++ b/gcc-4.9/libgfortran/generated/norm2_r4.c
@@ -101,10 +101,9 @@ norm2_r4 (gfc_array_r4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_REAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_4));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
diff --git a/gcc-4.9/libgfortran/generated/norm2_r8.c b/gcc-4.9/libgfortran/generated/norm2_r8.c
index 1bda1c5..51c8942 100644
--- a/gcc-4.9/libgfortran/generated/norm2_r8.c
+++ b/gcc-4.9/libgfortran/generated/norm2_r8.c
@@ -101,10 +101,9 @@ norm2_r8 (gfc_array_r8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_REAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_REAL_8));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
diff --git a/gcc-4.9/libgfortran/generated/pack_c10.c b/gcc-4.9/libgfortran/generated/pack_c10.c
index 9fcacf1..90866a8 100644
--- a/gcc-4.9/libgfortran/generated/pack_c10.c
+++ b/gcc-4.9/libgfortran/generated/pack_c10.c
@@ -167,8 +167,8 @@ pack_c10 (gfc_array_c10 *ret, const gfc_array_c10 *array,
ret->offset = 0;
- /* xmalloc allocates a single byte for zero size. */
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_10) * total);
+ /* xmallocarray allocates a single byte for zero size. */
+ ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_10));
if (total == 0)
return;
diff --git a/gcc-4.9/libgfortran/generated/pack_c16.c b/gcc-4.9/libgfortran/generated/pack_c16.c
index 0e3db34..60f60d1 100644
--- a/gcc-4.9/libgfortran/generated/pack_c16.c
+++ b/gcc-4.9/libgfortran/generated/pack_c16.c
@@ -167,8 +167,8 @@ pack_c16 (gfc_array_c16 *ret, const gfc_array_c16 *array,
ret->offset = 0;
- /* xmalloc allocates a single byte for zero size. */
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_16) * total);
+ /* xmallocarray allocates a single byte for zero size. */
+ ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_16));
if (total == 0)
return;
diff --git a/gcc-4.9/libgfortran/generated/pack_c4.c b/gcc-4.9/libgfortran/generated/pack_c4.c
index f17d35a..36a9f94 100644
--- a/gcc-4.9/libgfortran/generated/pack_c4.c
+++ b/gcc-4.9/libgfortran/generated/pack_c4.c
@@ -167,8 +167,8 @@ pack_c4 (gfc_array_c4 *ret, const gfc_array_c4 *array,
ret->offset = 0;
- /* xmalloc allocates a single byte for zero size. */
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_4) * total);
+ /* xmallocarray allocates a single byte for zero size. */
+ ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_4));
if (total == 0)
return;
diff --git a/gcc-4.9/libgfortran/generated/pack_c8.c b/gcc-4.9/libgfortran/generated/pack_c8.c
index f291b46..38880c1 100644
--- a/gcc-4.9/libgfortran/generated/pack_c8.c
+++ b/gcc-4.9/libgfortran/generated/pack_c8.c
@@ -167,8 +167,8 @@ pack_c8 (gfc_array_c8 *ret, const gfc_array_c8 *array,
ret->offset = 0;
- /* xmalloc allocates a single byte for zero size. */
- ret->base_addr = xmalloc (sizeof (GFC_COMPLEX_8) * total);
+ /* xmallocarray allocates a single byte for zero size. */
+ ret->base_addr = xmallocarray (total, sizeof (GFC_COMPLEX_8));
if (total == 0)
return;
diff --git a/gcc-4.9/libgfortran/generated/pack_i1.c b/gcc-4.9/libgfortran/generated/pack_i1.c
index b70127d..933cf9a 100644
--- a/gcc-4.9/libgfortran/generated/pack_i1.c
+++ b/gcc-4.9/libgfortran/generated/pack_i1.c
@@ -167,8 +167,8 @@ pack_i1 (gfc_array_i1 *ret, const gfc_array_i1 *array,
ret->offset = 0;
- /* xmalloc allocates a single byte for zero size. */
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_1) * total);
+ /* xmallocarray allocates a single byte for zero size. */
+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_1));
if (total == 0)
return;
diff --git a/gcc-4.9/libgfortran/generated/pack_i16.c b/gcc-4.9/libgfortran/generated/pack_i16.c
index da1faef..01d32ad 100644
--- a/gcc-4.9/libgfortran/generated/pack_i16.c
+++ b/gcc-4.9/libgfortran/generated/pack_i16.c
@@ -167,8 +167,8 @@ pack_i16 (gfc_array_i16 *ret, const gfc_array_i16 *array,
ret->offset = 0;
- /* xmalloc allocates a single byte for zero size. */
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_16) * total);
+ /* xmallocarray allocates a single byte for zero size. */
+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_16));
if (total == 0)
return;
diff --git a/gcc-4.9/libgfortran/generated/pack_i2.c b/gcc-4.9/libgfortran/generated/pack_i2.c
index 0481720..de329ab 100644
--- a/gcc-4.9/libgfortran/generated/pack_i2.c
+++ b/gcc-4.9/libgfortran/generated/pack_i2.c
@@ -167,8 +167,8 @@ pack_i2 (gfc_array_i2 *ret, const gfc_array_i2 *array,
ret->offset = 0;
- /* xmalloc allocates a single byte for zero size. */
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_2) * total);
+ /* xmallocarray allocates a single byte for zero size. */
+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_2));
if (total == 0)
return;
diff --git a/gcc-4.9/libgfortran/generated/pack_i4.c b/gcc-4.9/libgfortran/generated/pack_i4.c
index 0a0b4ba..93ac356 100644
--- a/gcc-4.9/libgfortran/generated/pack_i4.c
+++ b/gcc-4.9/libgfortran/generated/pack_i4.c
@@ -167,8 +167,8 @@ pack_i4 (gfc_array_i4 *ret, const gfc_array_i4 *array,
ret->offset = 0;
- /* xmalloc allocates a single byte for zero size. */
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_4) * total);
+ /* xmallocarray allocates a single byte for zero size. */
+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_4));
if (total == 0)
return;
diff --git a/gcc-4.9/libgfortran/generated/pack_i8.c b/gcc-4.9/libgfortran/generated/pack_i8.c
index 183a0fe..ec7b427 100644
--- a/gcc-4.9/libgfortran/generated/pack_i8.c
+++ b/gcc-4.9/libgfortran/generated/pack_i8.c
@@ -167,8 +167,8 @@ pack_i8 (gfc_array_i8 *ret, const gfc_array_i8 *array,
ret->offset = 0;
- /* xmalloc allocates a single byte for zero size. */
- ret->base_addr = xmalloc (sizeof (GFC_INTEGER_8) * total);
+ /* xmallocarray allocates a single byte for zero size. */
+ ret->base_addr = xmallocarray (total, sizeof (GFC_INTEGER_8));
if (total == 0)
return;
diff --git a/gcc-4.9/libgfortran/generated/pack_r10.c b/gcc-4.9/libgfortran/generated/pack_r10.c
index d1c2297..8b3e816 100644
--- a/gcc-4.9/libgfortran/generated/pack_r10.c
+++ b/gcc-4.9/libgfortran/generated/pack_r10.c
@@ -167,8 +167,8 @@ pack_r10 (gfc_array_r10 *ret, const gfc_array_r10 *array,
ret->offset = 0;
- /* xmalloc allocates a single byte for zero size. */
- ret->base_addr = xmalloc (sizeof (GFC_REAL_10) * total);
+ /* xmallocarray allocates a single byte for zero size. */
+ ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_10));
if (total == 0)
return;
diff --git a/gcc-4.9/libgfortran/generated/pack_r16.c b/gcc-4.9/libgfortran/generated/pack_r16.c
index 59a6f58..598ef8e 100644
--- a/gcc-4.9/libgfortran/generated/pack_r16.c
+++ b/gcc-4.9/libgfortran/generated/pack_r16.c
@@ -167,8 +167,8 @@ pack_r16 (gfc_array_r16 *ret, const gfc_array_r16 *array,
ret->offset = 0;
- /* xmalloc allocates a single byte for zero size. */
- ret->base_addr = xmalloc (sizeof (GFC_REAL_16) * total);
+ /* xmallocarray allocates a single byte for zero size. */
+ ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_16));
if (total == 0)
return;
diff --git a/gcc-4.9/libgfortran/generated/pack_r4.c b/gcc-4.9/libgfortran/generated/pack_r4.c
index 86ec8ff..955a812 100644
--- a/gcc-4.9/libgfortran/generated/pack_r4.c
+++ b/gcc-4.9/libgfortran/generated/pack_r4.c
@@ -167,8 +167,8 @@ pack_r4 (gfc_array_r4 *ret, const gfc_array_r4 *array,
ret->offset = 0;
- /* xmalloc allocates a single byte for zero size. */
- ret->base_addr = xmalloc (sizeof (GFC_REAL_4) * total);
+ /* xmallocarray allocates a single byte for zero size. */
+ ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_4));
if (total == 0)
return;
diff --git a/gcc-4.9/libgfortran/generated/pack_r8.c b/gcc-4.9/libgfortran/generated/pack_r8.c
index 6d7c155..d0bb227 100644
--- a/gcc-4.9/libgfortran/generated/pack_r8.c
+++ b/gcc-4.9/libgfortran/generated/pack_r8.c
@@ -167,8 +167,8 @@ pack_r8 (gfc_array_r8 *ret, const gfc_array_r8 *array,
ret->offset = 0;
- /* xmalloc allocates a single byte for zero size. */
- ret->base_addr = xmalloc (sizeof (GFC_REAL_8) * total);
+ /* xmallocarray allocates a single byte for zero size. */
+ ret->base_addr = xmallocarray (total, sizeof (GFC_REAL_8));
if (total == 0)
return;
diff --git a/gcc-4.9/libgfortran/generated/parity_l1.c b/gcc-4.9/libgfortran/generated/parity_l1.c
index f71e9ad..ff81d1a 100644
--- a/gcc-4.9/libgfortran/generated/parity_l1.c
+++ b/gcc-4.9/libgfortran/generated/parity_l1.c
@@ -98,10 +98,9 @@ parity_l1 (gfc_array_l1 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_LOGICAL_1) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_1));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
diff --git a/gcc-4.9/libgfortran/generated/parity_l16.c b/gcc-4.9/libgfortran/generated/parity_l16.c
index ba50d96..66970d0 100644
--- a/gcc-4.9/libgfortran/generated/parity_l16.c
+++ b/gcc-4.9/libgfortran/generated/parity_l16.c
@@ -98,10 +98,9 @@ parity_l16 (gfc_array_l16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_LOGICAL_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_16));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
diff --git a/gcc-4.9/libgfortran/generated/parity_l2.c b/gcc-4.9/libgfortran/generated/parity_l2.c
index b719eb8..5942257 100644
--- a/gcc-4.9/libgfortran/generated/parity_l2.c
+++ b/gcc-4.9/libgfortran/generated/parity_l2.c
@@ -98,10 +98,9 @@ parity_l2 (gfc_array_l2 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_LOGICAL_2) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_2));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
diff --git a/gcc-4.9/libgfortran/generated/parity_l4.c b/gcc-4.9/libgfortran/generated/parity_l4.c
index 7274d72..4f8a9f9 100644
--- a/gcc-4.9/libgfortran/generated/parity_l4.c
+++ b/gcc-4.9/libgfortran/generated/parity_l4.c
@@ -98,10 +98,9 @@ parity_l4 (gfc_array_l4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_LOGICAL_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_4));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
diff --git a/gcc-4.9/libgfortran/generated/parity_l8.c b/gcc-4.9/libgfortran/generated/parity_l8.c
index 9c4e571..73b1d9f 100644
--- a/gcc-4.9/libgfortran/generated/parity_l8.c
+++ b/gcc-4.9/libgfortran/generated/parity_l8.c
@@ -98,10 +98,9 @@ parity_l8 (gfc_array_l8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_LOGICAL_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_LOGICAL_8));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
diff --git a/gcc-4.9/libgfortran/generated/product_c10.c b/gcc-4.9/libgfortran/generated/product_c10.c
index 6b2ea5f..7b32583 100644
--- a/gcc-4.9/libgfortran/generated/product_c10.c
+++ b/gcc-4.9/libgfortran/generated/product_c10.c
@@ -97,10 +97,9 @@ product_c10 (gfc_array_c10 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -272,8 +271,7 @@ mproduct_c10 (gfc_array_c10 * const restrict retarray,
}
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -285,7 +283,7 @@ mproduct_c10 (gfc_array_c10 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
}
else
@@ -430,8 +428,7 @@ sproduct_c10 (gfc_array_c10 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_COMPLEX_10) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -440,7 +437,7 @@ sproduct_c10 (gfc_array_c10 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_10));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/product_c16.c b/gcc-4.9/libgfortran/generated/product_c16.c
index 42d5dcd..4f31e1b 100644
--- a/gcc-4.9/libgfortran/generated/product_c16.c
+++ b/gcc-4.9/libgfortran/generated/product_c16.c
@@ -97,10 +97,9 @@ product_c16 (gfc_array_c16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -272,8 +271,7 @@ mproduct_c16 (gfc_array_c16 * const restrict retarray,
}
- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -285,7 +283,7 @@ mproduct_c16 (gfc_array_c16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
}
else
@@ -430,8 +428,7 @@ sproduct_c16 (gfc_array_c16 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_COMPLEX_16) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -440,7 +437,7 @@ sproduct_c16 (gfc_array_c16 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_16));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/product_c4.c b/gcc-4.9/libgfortran/generated/product_c4.c
index 04d3cf9..038c502 100644
--- a/gcc-4.9/libgfortran/generated/product_c4.c
+++ b/gcc-4.9/libgfortran/generated/product_c4.c
@@ -97,10 +97,9 @@ product_c4 (gfc_array_c4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -272,8 +271,7 @@ mproduct_c4 (gfc_array_c4 * const restrict retarray,
}
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
@@ -285,7 +283,7 @@ mproduct_c4 (gfc_array_c4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
}
else
@@ -430,8 +428,7 @@ sproduct_c4 (gfc_array_c4 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_COMPLEX_4) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
if (alloc_size == 0)
{
@@ -440,7 +437,7 @@ sproduct_c4 (gfc_array_c4 * const restrict retarray,
return;
}
else
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_4));
}
else
{
diff --git a/gcc-4.9/libgfortran/generated/product_c8.c b/gcc-4.9/libgfortran/generated/product_c8.c
index 184e1bc..a941a6c 100644
--- a/gcc-4.9/libgfortran/generated/product_c8.c
+++ b/gcc-4.9/libgfortran/generated/product_c8.c
@@ -97,10 +97,9 @@ product_c8 (gfc_array_c8 * const restrict retarray,
retarray->offset = 0;
retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)
- * extent[rank-1];
+ alloc_size = GFC_DESCRIPTOR_STRIDE(retarray,rank-1) * extent[rank-1];
- retarray->base_addr = xmalloc (alloc_size);
+ retarray->base_addr = xmallocarray (alloc_size, sizeof (GFC_COMPLEX_8));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
@@ -272,8 +271,7 @@ mproduct_c8 (gfc_array_c8 * const restrict retarray,
}
- alloc_size = sizeof (GFC_COMPLEX_8) * GFC_DESCRIPTOR_STRIDE(retarray,rank-1)