re PR bootstrap/70704 (AIX bootstrap comparison failure)
authorJakub Jelinek <jakub@redhat.com>
Tue, 26 Apr 2016 06:10:43 +0000 (08:10 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 26 Apr 2016 06:10:43 +0000 (08:10 +0200)
PR bootstrap/70704
* configure.ac (--enable-stage1-checking): For --disable-checking or
implicit --enable-checking, make sure extra flag matches in between
stage1 and later checking.
* configure: Regenerated.
gcc/
* configure.ac (--enable-checking): Document extra flag, for
non-release builds default to --enable-checking=yes,extra.
If misc checking and extra checking, define CHECKING_P to 2 instead
of 1.
* common.opt (fchecking=): Add.
* doc/invoke.texi (-fchecking=): Document.
* doc/install.texi: Document --enable-checking changes.
* configure: Regenerated.
* config.in: Regenerated.
gcc/cp/
* pt.c (build_non_dependent_expr): Use flag_checking > 1 instead of
just flag_checking.

From-SVN: r235430

12 files changed:
ChangeLog
configure
configure.ac
gcc/ChangeLog
gcc/common.opt
gcc/config.in
gcc/configure
gcc/configure.ac
gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/doc/install.texi
gcc/doc/invoke.texi

index 3b0f3d0c460c5fab0e69d5ed1c6b54d7aa572d71..6ee632f7eb671f283a0ad2c7e9d51215aa2fd3e2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2016-04-26  Jakub Jelinek  <jakub@redhat.com>
+
+       PR bootstrap/70704
+       * configure.ac (--enable-stage1-checking): For --disable-checking or
+       implicit --enable-checking, make sure extra flag matches in between
+       stage1 and later checking.
+       * configure: Regenerated.
+
 2016-04-22  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
 
        * .gitattributes: New file.
index 35f231ea92bdae7d9dbd46c63c2a6e054ed44fe8..d747385ddbf5d2131af13183a220605e4d057e91 100755 (executable)
--- a/configure
+++ b/configure
@@ -14850,16 +14850,17 @@ else
   # For --disable-checking or implicit --enable-checking=release, avoid
   # setting --enable-checking=gc in the default stage1 checking for LTO
   # bootstraps.  See PR62077.
-  stage1_checking=--enable-checking=release,misc,gimple,rtlflag,tree,types
   case $BUILD_CONFIG in
     *lto*)
-      if test "x$enable_checking" = x && \
-        test -d ${srcdir}/gcc && \
-        test x"`cat ${srcdir}/gcc/DEV-PHASE`" = xexperimental; then
-       stage1_checking=--enable-checking=yes,types
-      fi;;
-    *) stage1_checking=--enable-checking=yes,types;;
+      stage1_checking=--enable-checking=release,misc,gimple,rtlflag,tree,types;;
+    *)
+      stage1_checking=--enable-checking=yes,types;;
   esac
+  if test "x$enable_checking" = x && \
+     test -d ${srcdir}/gcc && \
+     test x"`cat ${srcdir}/gcc/DEV-PHASE`" = xexperimental; then
+    stage1_checking=yes,types,extra
+  fi
 else
   stage1_checking=--enable-checking=$enable_checking,types
 fi
index 74bf58aad93b8a51fe161d3a71748d38b27c6907..1652182fd149093386a9dc81ace27d403f4cc4b2 100644 (file)
@@ -3530,16 +3530,17 @@ AC_ARG_ENABLE(stage1-checking,
   # For --disable-checking or implicit --enable-checking=release, avoid
   # setting --enable-checking=gc in the default stage1 checking for LTO
   # bootstraps.  See PR62077.
-  stage1_checking=--enable-checking=release,misc,gimple,rtlflag,tree,types
   case $BUILD_CONFIG in
     *lto*)
-      if test "x$enable_checking" = x && \
-        test -d ${srcdir}/gcc && \
-        test x"`cat ${srcdir}/gcc/DEV-PHASE`" = xexperimental; then
-       stage1_checking=--enable-checking=yes,types
-      fi;;
-    *) stage1_checking=--enable-checking=yes,types;;
+      stage1_checking=--enable-checking=release,misc,gimple,rtlflag,tree,types;;
+    *)
+      stage1_checking=--enable-checking=yes,types;;
   esac
+  if test "x$enable_checking" = x && \
+     test -d ${srcdir}/gcc && \
+     test x"`cat ${srcdir}/gcc/DEV-PHASE`" = xexperimental; then
+    stage1_checking=yes,types,extra
+  fi
 else
   stage1_checking=--enable-checking=$enable_checking,types
 fi])
index 282642c70e7fde7ce2dd17bb2901b367cb37855d..21ac47206bbcefd8e0c02f376a53789a34c78eaf 100644 (file)
@@ -1,3 +1,16 @@
+2016-04-26  Jakub Jelinek  <jakub@redhat.com>
+
+       PR bootstrap/70704
+       * configure.ac (--enable-checking): Document extra flag, for
+       non-release builds default to --enable-checking=yes,extra.
+       If misc checking and extra checking, define CHECKING_P to 2 instead
+       of 1.
+       * common.opt (fchecking=): Add.
+       * doc/invoke.texi (-fchecking=): Document.
+       * doc/install.texi: Document --enable-checking changes.
+       * configure: Regenerated.
+       * config.in: Regenerated.
+
 2016-04-25  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/i386.md (*movxi_internal_avx512f): Use insn type
index 67048db7c9baf3a0d6098963c0b8f5131d1a8889..682cb417e3d1883b62587941359880d7374f1f52 100644 (file)
@@ -1029,6 +1029,10 @@ fchecking
 Common Var(flag_checking) Init(CHECKING_P)
 Perform internal consistency checkings.
 
+fchecking=
+Common Joined RejectNegative UInteger Var(flag_checking)
+Perform internal consistency checkings.
+
 fcombine-stack-adjustments
 Common Report Var(flag_combine_stack_adjustments) Optimization
 Looks for opportunities to reduce stack adjustments and stack references.
index 115cb61639dacd2661e2ef1ec7759ffb8917aa0f..bdde25fe12f4b7f23f3eab09ab23800628d01653 100644 (file)
@@ -31,7 +31,8 @@
 
 
 /* Define to 1 if you want more run-time sanity checks. This one gets a grab
-   bag of miscellaneous but relatively cheap checks. */
+   bag of miscellaneous but relatively cheap checks. Define to 2 if you want
+   also extra run-time checking that might affect code generation. */
 #ifndef USED_FOR_TARGET
 #undef CHECKING_P
 #endif
index 1c6e3407ce7cad2567b05a848ebd16009adf9919..d4d5ddf693112c229f03e8fcd141e0b8dae79cd2 100755 (executable)
@@ -1596,7 +1596,7 @@ Optional Features:
                           enable expensive run-time checks. With LIST, enable
                           only specific categories of checks. Categories are:
                           yes,no,all,none,release. Flags are:
-                          assert,df,fold,gc,gcac,gimple,misc,
+                          assert,df,extra,fold,gc,gcac,gimple,misc,
                           rtlflag,rtl,runtime,tree,valgrind,types
   --enable-coverage[=LEVEL]
                           enable compiler's code coverage collection. Use to
@@ -7075,7 +7075,7 @@ else
 
 # Determine the default checks.
 if test x$is_release = x ; then
-  ac_checking_flags=yes
+  ac_checking_flags=yes,extra
 else
   ac_checking_flags=release
 fi
@@ -7087,32 +7087,33 @@ do
        case $check in
        # these set all the flags to specific states
        yes)            ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking= ;
-                       ac_fold_checking= ; ac_gc_checking=1 ;
+                       ac_fold_checking= ; ac_gc_checking=1 ; ac_extra_checking= ;
                        ac_gc_always_collect= ; ac_gimple_checking=1 ; ac_rtl_checking= ;
                        ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
                        ac_tree_checking=1 ; ac_valgrind_checking= ;
                        ac_types_checking=1 ;;
        no|none)        ac_assert_checking= ; ac_checking= ; ac_df_checking= ;
-                       ac_fold_checking= ; ac_gc_checking= ;
+                       ac_fold_checking= ; ac_gc_checking= ; ac_extra_checking= ;
                        ac_gc_always_collect= ; ac_gimple_checking= ; ac_rtl_checking= ;
                        ac_rtlflag_checking= ; ac_runtime_checking= ;
                        ac_tree_checking= ; ac_valgrind_checking= ;
                        ac_types_checking= ;;
        all)            ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking=1 ;
-                       ac_fold_checking=1 ; ac_gc_checking=1 ;
+                       ac_fold_checking=1 ; ac_gc_checking=1 ; ac_extra_checking=1 ;
                        ac_gc_always_collect=1 ; ac_gimple_checking=1 ; ac_rtl_checking=1 ;
                        ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
                        ac_tree_checking=1 ; ac_valgrind_checking= ;
                        ac_types_checking=1 ;;
        release)        ac_assert_checking=1 ; ac_checking= ; ac_df_checking= ;
-                       ac_fold_checking= ; ac_gc_checking= ;
+                       ac_fold_checking= ; ac_gc_checking= ; ac_extra_checking= ;
                        ac_gc_always_collect= ; ac_gimple_checking= ; ac_rtl_checking= ;
                        ac_rtlflag_checking= ; ac_runtime_checking=1 ;
                        ac_tree_checking= ; ac_valgrind_checking= ;
                        ac_types_checking= ;;
        # these enable particular checks
        assert)         ac_assert_checking=1 ;;
-       df)             ac_df_checking=1 ;;
+       df)             ac_df_checking=1 ;;
+       extra)          ac_extra_checking=1 ;;
        fold)           ac_fold_checking=1 ;;
        gc)             ac_gc_checking=1 ;;
        gcac)           ac_gc_always_collect=1 ;;
@@ -7131,8 +7132,13 @@ IFS="$ac_save_IFS"
 
 nocommon_flag=""
 if test x$ac_checking != x ; then
+  if test x$ac_extra_checking != x ; then
+    ac_checking=2
+  fi
 
-$as_echo "#define CHECKING_P 1" >>confdefs.h
+cat >>confdefs.h <<_ACEOF
+#define CHECKING_P $ac_checking
+_ACEOF
 
   nocommon_flag=-fno-common
 else
@@ -18453,7 +18459,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 18456 "configure"
+#line 18462 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -18559,7 +18565,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 18562 "configure"
+#line 18568 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index 6c1dcd9aedb4e6e9dfee795f1d86be40d8534e22..0328a2cd024b4185251cfcc2edfb6bf72534be9f 100644 (file)
@@ -516,12 +516,12 @@ AC_ARG_ENABLE(checking,
                [enable expensive run-time checks.  With LIST,
                 enable only specific categories of checks.
                 Categories are: yes,no,all,none,release.
-                Flags are: assert,df,fold,gc,gcac,gimple,misc,
+                Flags are: assert,df,extra,fold,gc,gcac,gimple,misc,
                 rtlflag,rtl,runtime,tree,valgrind,types])],
 [ac_checking_flags="${enableval}"],[
 # Determine the default checks.
 if test x$is_release = x ; then
-  ac_checking_flags=yes
+  ac_checking_flags=yes,extra
 else
   ac_checking_flags=release
 fi])
@@ -531,32 +531,33 @@ do
        case $check in
        # these set all the flags to specific states
        yes)            ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking= ;
-                       ac_fold_checking= ; ac_gc_checking=1 ;
+                       ac_fold_checking= ; ac_gc_checking=1 ; ac_extra_checking= ;
                        ac_gc_always_collect= ; ac_gimple_checking=1 ; ac_rtl_checking= ;
                        ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
                        ac_tree_checking=1 ; ac_valgrind_checking= ;
                        ac_types_checking=1 ;;
        no|none)        ac_assert_checking= ; ac_checking= ; ac_df_checking= ;
-                       ac_fold_checking= ; ac_gc_checking= ;
+                       ac_fold_checking= ; ac_gc_checking= ; ac_extra_checking= ;
                        ac_gc_always_collect= ; ac_gimple_checking= ; ac_rtl_checking= ;
                        ac_rtlflag_checking= ; ac_runtime_checking= ;
                        ac_tree_checking= ; ac_valgrind_checking= ;
                        ac_types_checking= ;;
        all)            ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking=1 ;
-                       ac_fold_checking=1 ; ac_gc_checking=1 ;
+                       ac_fold_checking=1 ; ac_gc_checking=1 ; ac_extra_checking=1 ;
                        ac_gc_always_collect=1 ; ac_gimple_checking=1 ; ac_rtl_checking=1 ;
                        ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
                        ac_tree_checking=1 ; ac_valgrind_checking= ;
                        ac_types_checking=1 ;;
        release)        ac_assert_checking=1 ; ac_checking= ; ac_df_checking= ;
-                       ac_fold_checking= ; ac_gc_checking= ;
+                       ac_fold_checking= ; ac_gc_checking= ; ac_extra_checking= ;
                        ac_gc_always_collect= ; ac_gimple_checking= ; ac_rtl_checking= ;
                        ac_rtlflag_checking= ; ac_runtime_checking=1 ;
                        ac_tree_checking= ; ac_valgrind_checking= ;
                        ac_types_checking= ;;
        # these enable particular checks
        assert)         ac_assert_checking=1 ;;
-       df)             ac_df_checking=1 ;;
+       df)             ac_df_checking=1 ;;
+       extra)          ac_extra_checking=1 ;;
        fold)           ac_fold_checking=1 ;;
        gc)             ac_gc_checking=1 ;;
        gcac)           ac_gc_always_collect=1 ;;
@@ -575,9 +576,13 @@ IFS="$ac_save_IFS"
 
 nocommon_flag=""
 if test x$ac_checking != x ; then
-  AC_DEFINE(CHECKING_P, 1,
+  if test x$ac_extra_checking != x ; then
+    ac_checking=2
+  fi
+  AC_DEFINE_UNQUOTED(CHECKING_P, $ac_checking,
 [Define to 1 if you want more run-time sanity checks.  This one gets a grab
-   bag of miscellaneous but relatively cheap checks.])
+   bag of miscellaneous but relatively cheap checks.  Define to 2 if you want
+   also extra run-time checking that might affect code generation.])
   nocommon_flag=-fno-common
 else
   AC_DEFINE(CHECKING_P, 0)
index e9c50d663fed528e824f008bd16c8c226065201f..a81ffa0c0e24938adc424d33cbaecac657d23599 100644 (file)
@@ -1,3 +1,9 @@
+2016-04-26  Jakub Jelinek  <jakub@redhat.com>
+
+       PR bootstrap/70704
+       * pt.c (build_non_dependent_expr): Use flag_checking > 1 instead of
+       just flag_checking.
+
 2016-04-25  Jason Merrill  <jason@redhat.com>
 
        * tree.c (std_attribute_table): New.
index e18422f37ecc889eaaa05a8ddafddd1f0d4f60fd..2d033e3771ad67730a11b46952497d1bb5654e13 100644 (file)
@@ -23623,8 +23623,10 @@ build_non_dependent_expr (tree expr)
 
   /* When checking, try to get a constant value for all non-dependent
      expressions in order to expose bugs in *_dependent_expression_p
-     and constexpr.  */
-  if (flag_checking && cxx_dialect >= cxx11
+     and constexpr.  This can affect code generation, see PR70704, so
+     only do this for -fchecking=2.  */
+  if (flag_checking > 1
+      && cxx_dialect >= cxx11
       /* Don't do this during nsdmi parsing as it can lead to
         unexpected recursive instantiations.  */
       && !parsing_nsdmi ())
index 4268036ca51551677615c62d55d245ca38b0517b..e1ca26c9e384257c53bed79ca199bf32b13409df 100644 (file)
@@ -1708,7 +1708,7 @@ When you specify this option, the compiler is built to perform internal
 consistency checks of the requested complexity.  This does not change the
 generated code, but adds error checking within the compiler.  This will
 slow down the compiler and may only work properly if you are building
-the compiler with GCC@.  This is @samp{yes} by default when building
+the compiler with GCC@.  This is @samp{yes,extra} by default when building
 from SVN or snapshots, but @samp{release} for releases.  The default
 for building the stage1 compiler is @samp{yes}.  More control
 over the checks may be had by specifying @var{list}.  The categories of
@@ -1717,8 +1717,11 @@ checks available are @samp{yes} (most common checks
 all), @samp{all} (all but @samp{valgrind}), @samp{release} (cheapest
 checks @samp{assert,runtime}) or @samp{none} (same as @samp{no}).
 Individual checks can be enabled with these flags @samp{assert},
-@samp{df}, @samp{fold}, @samp{gc}, @samp{gcac} @samp{misc}, @samp{rtl},
-@samp{rtlflag}, @samp{runtime}, @samp{tree}, and @samp{valgrind}.
+@samp{df}, @samp{fold}, @samp{gc}, @samp{gcac}, @samp{misc}, @samp{rtl},
+@samp{rtlflag}, @samp{runtime}, @samp{tree}, @samp{extra} and @samp{valgrind}.
+@samp{extra} adds for @samp{misc} checking extra checks that might affect
+code generation and should therefore not differ between stage1 and later
+stages.
 
 The @samp{valgrind} check requires the external @command{valgrind}
 simulator, available from @uref{http://valgrind.org/}.  The
index 821f8fd8594b815a3a7f5fd45bdcb1a02b20c5b3..0f97e6d912c8415e2452e4b0ab4161f3d31c749b 100644 (file)
@@ -501,7 +501,8 @@ Objective-C and Objective-C++ Dialects}.
 @item Developer Options
 @xref{Developer Options,,GCC Developer Options}.
 @gccoptlist{-d@var{letters}  -dumpspecs  -dumpmachine  -dumpversion @gol
--fchecking -fdbg-cnt-list -fdbg-cnt=@var{counter-value-list} @gol
+-fchecking -fchecking=@var{n} -fdbg-cnt-list @gol
+-fdbg-cnt=@var{counter-value-list} @gol
 -fdisable-ipa-@var{pass_name} @gol
 -fdisable-rtl-@var{pass_name} @gol
 -fdisable-rtl-@var{pass-name}=@var{range-list} @gol
@@ -12368,10 +12369,12 @@ Here are some examples showing uses of these options.
 @end smallexample
 
 @item -fchecking
+@itemx -fchecking=@var{n}
 @opindex fchecking
 @opindex fno-checking
 Enable internal consistency checking.  The default depends on
-the compiler configuration.
+the compiler configuration.  @option{-fchecking=2} enables further
+internal consistency checking that might affect code generation.
 
 @item -frandom-seed=@var{string}
 @opindex frandom-seed