From 71017a7b7837a4eeb1d1c0b2b155c6567f4f3d95 Mon Sep 17 00:00:00 2001 From: Alan Lawrence Date: Thu, 10 Mar 2016 12:19:45 +0000 Subject: Add -funconstrained-commons to work around PR/69368 (and others) in SPEC2006 gcc/: * common.opt (funconstrained-commons, flag_unconstrained_commons): New. * tree.c (array_at_struct_end_p): Do not limit to size of decl for DECL_COMMONS if flag_unconstrained_commons is set. * tree-dfa.c (get_ref_base_and_extent): Likewise. * doc/invoke.texi (Optimize Options): Add -funconstrained-commons. (funconstrained-commons): Document. gcc/testsuite: * gfortran.dg/unconstrained_commons.f: New. Co-Authored-By: Jakub Jelinek From-SVN: r234106 --- gcc/doc/invoke.texi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gcc/doc') diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 9580c10..99ac11b 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -408,7 +408,7 @@ Objective-C and Objective-C++ Dialects}. -ftree-parallelize-loops=@var{n} -ftree-pre -ftree-partial-pre -ftree-pta @gol -ftree-reassoc -ftree-sink -ftree-slsr -ftree-sra @gol -ftree-switch-conversion -ftree-tail-merge -ftree-ter @gol --ftree-vectorize -ftree-vrp @gol +-ftree-vectorize -ftree-vrp -funconstrained-commons @gol -funit-at-a-time -funroll-all-loops -funroll-loops @gol -funsafe-loop-optimizations -funsafe-math-optimizations -funswitch-loops @gol -fipa-ra -fvariable-expansion-in-unroller -fvect-cost-model -fvpt @gol @@ -6699,6 +6699,12 @@ the loop optimizer itself cannot prove that these assumptions are valid. If you use @option{-Wunsafe-loop-optimizations}, the compiler warns you if it finds this kind of loop. +@item -funconstrained-commons +@opindex funconstrained-commons +This option tells the compiler that variables declared in common blocks +(e.g. Fortran) may later be overridden with longer trailing arrays. This +prevents certain optimizations that depend on knowing the array bounds. + @item -fcrossjumping @opindex fcrossjumping Perform cross-jumping transformation. -- cgit v1.1