From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3954 invoked by alias); 11 Jan 2013 09:11:48 -0000 Received: (qmail 3941 invoked by uid 22791); 11 Jan 2013 09:11:46 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 11 Jan 2013 09:11:35 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 5B7D1290097 for ; Fri, 11 Jan 2013 10:11:43 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MHxFAzS8kKjo for ; Fri, 11 Jan 2013 10:11:43 +0100 (CET) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 3B2B12900A5 for ; Fri, 11 Jan 2013 10:11:42 +0100 (CET) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [patch] Disable Ada front-end checking in release mode Date: Fri, 11 Jan 2013 09:11:00 -0000 Message-ID: <1477074.PI8pod8Vd6@polaris> User-Agent: KMail/4.7.2 (Linux/3.1.10-1.16-desktop; KDE/4.7.2; x86_64; ; ) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart9566946.dNYjHZxMFn" Content-Transfer-Encoding: 7Bit Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2013-01/txt/msg00581.txt.bz2 --nextPart9566946.dNYjHZxMFn Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Content-length: 1139 Hi, the Ada part of the Ada front-end is compiled with -gnata, which boils down to a form of dynamic type checking for the AST, i.e. something roughly equivalent to Tree checking for the front-ends of the C family of compilers. This patch aligns the Ada compiler with them by disabling it in --enable-checking=release mode. Issues flagged by this checking are usually benign on release branches and gigi has a slew of gcc_assert's that stop the compiler in serious cases. Bootstrapped on x86_64-suse-linux (w and w/o --enable-checking=release), OK for the mainline? 2013-01-11 Eric Botcazou * Makefile.tpl (BOOT_ADAFLAGS): Remove -gnata. * Makefile.in: Regenerate. gcc/ 2013-01-11 Eric Botcazou * configure.ac (Tree checking): Set TREECHECKING to yes if enabled. Substitute TREECHECKING. * configure: Regenerate. * Makefile.in (TREECHECKING): New. gcc/ada/ 2013-01-11 Eric Botcazou * gcc-interface/Make-lang.in (COMMON_ADAFLAGS): Remove -gnata. (CHECKING_ADAFLAGS): New. (ALL_ADAFLAGS): Include CHECKING_ADAFLAGS. -- Eric Botcazou --nextPart9566946.dNYjHZxMFn Content-Disposition: attachment; filename="p.diff" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="p.diff" Content-length: 2641 Index: gcc/ada/gcc-interface/Make-lang.in =================================================================== --- gcc/ada/gcc-interface/Make-lang.in (revision 195091) +++ gcc/ada/gcc-interface/Make-lang.in (working copy) @@ -45,7 +45,12 @@ RMDIR = rm -rf # Extra flags to pass to recursive makes. -COMMON_ADAFLAGS= -gnatpg -gnata +COMMON_ADAFLAGS= -gnatpg +ifeq ($(TREECHECKING),) +CHECKING_ADAFLAGS= +else +CHECKING_ADAFLAGS= -gnata +endif WARN_ADAFLAGS= -W -Wall # For native builds, the base compiler might be old and we need to arrange for @@ -59,7 +64,8 @@ else ADAFLAGS= $(COMMON_ADAFLAGS) endif -ALL_ADAFLAGS = $(CFLAGS) $(ADA_CFLAGS) $(ADAFLAGS) $(WARN_ADAFLAGS) +ALL_ADAFLAGS = \ + $(CFLAGS) $(ADA_CFLAGS) $(ADAFLAGS) $(CHECKING_ADAFLAGS) $(WARN_ADAFLAGS) FORCE_DEBUG_ADAFLAGS = -g ADA_CFLAGS = ADA_INCLUDES = -nostdinc -I- -I. -Iada -I$(srcdir)/ada -I$(srcdir)/ada/gcc-interface Index: gcc/configure.ac =================================================================== --- gcc/configure.ac (revision 195012) +++ gcc/configure.ac (working copy) @@ -471,6 +471,7 @@ if test x$ac_tree_checking != x ; then routines will also be enabled by this option. ]) TREEBROWSER=tree-browser.o + TREECHECKING=yes fi if test x$ac_types_checking != x ; then AC_DEFINE(ENABLE_TYPES_CHECKING, 1, @@ -479,6 +480,7 @@ if test x$ac_types_checking != x ; then ]) fi AC_SUBST(TREEBROWSER) +AC_SUBST(TREECHECKING) if test x$ac_rtl_checking != x ; then AC_DEFINE(ENABLE_RTL_CHECKING, 1, [Define if you want all operations on RTL (the basic data structure Index: gcc/Makefile.in =================================================================== --- gcc/Makefile.in (revision 195012) +++ gcc/Makefile.in (working copy) @@ -1487,6 +1487,10 @@ ALL_HOST_OBJS = $(ALL_HOST_FRONTEND_OBJS BACKEND = libbackend.a main.o @TREEBROWSER@ libcommon-target.a libcommon.a \ $(CPPLIB) $(LIBDECNUMBER) +# This is defined to "yes" if Tree checking is enabled, which roughly means +# front-end checking. +TREECHECKING = @TREECHECKING@ + MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \ insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \ insn-attr.h insn-attr-common.h insn-attrtab.c insn-dfatab.c \ Index: Makefile.tpl =================================================================== --- Makefile.tpl (revision 195012) +++ Makefile.tpl (working copy) @@ -367,7 +367,7 @@ BUILD_PREFIX_1 = @BUILD_PREFIX_1@ # here so that they can be overridden by Makefile fragments. BOOT_CFLAGS= -g -O2 BOOT_LDFLAGS= -BOOT_ADAFLAGS=-gnatpg -gnata +BOOT_ADAFLAGS= -gnatpg AWK = @AWK@ SED = @SED@ --nextPart9566946.dNYjHZxMFn--