From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10455 invoked by alias); 18 Oct 2008 02:02:46 -0000 Received: (qmail 10247 invoked by uid 22791); 18 Oct 2008 02:02:45 -0000 X-Spam-Check-By: sourceware.org Received: from mail-gx0-f17.google.com (HELO mail-gx0-f17.google.com) (209.85.217.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 18 Oct 2008 02:02:10 +0000 Received: by gxk10 with SMTP id 10so1906538gxk.8 for ; Fri, 17 Oct 2008 19:02:08 -0700 (PDT) Received: by 10.90.88.17 with SMTP id l17mr1957772agb.0.1224295327840; Fri, 17 Oct 2008 19:02:07 -0700 (PDT) Received: by 10.90.49.12 with HTTP; Fri, 17 Oct 2008 19:02:07 -0700 (PDT) Message-ID: <4aca3dc20810171902r4af6b3bdp41022648f6414554@mail.gmail.com> Date: Sat, 18 Oct 2008 10:28:00 -0000 From: "Daniel Berlin" To: "Laurent GUERBY" Subject: Re: [PATCH]: Fix missed PRE optimization discovered Cc: "Eric Botcazou" , "Andreas Schwab" , gcc-patches@gcc.gnu.org In-Reply-To: <1224268489.15158.182.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4aca3dc20810161526r14037c7dq28f8fb2b4c7a679c@mail.gmail.com> <4aca3dc20810170733g6d04f968s95744ae36de2ad86@mail.gmail.com> <4aca3dc20810170814s771687dcv64f7f45ce8ad8229@mail.gmail.com> <200810171918.00156.ebotcazou@adacore.com> <1224268489.15158.182.camel@localhost> X-IsSubscribed: yes 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: 2008-10/txt/msg00770.txt.bz2 I'm currently testing the following, which at least doesn't crash on the minimized testcase i produced :) Index: tree-ssa-pre.c =================================================================== --- tree-ssa-pre.c (revision 141195) +++ tree-ssa-pre.c (working copy) @@ -3022,21 +3022,13 @@ if (TREE_TYPE (constant) != type) { tree builtexpr = fold_convert (type, constant); - if (is_gimple_min_invariant (builtexpr)) + if (!is_gimple_min_invariant (builtexpr)) { - PRE_EXPR_CONSTANT (eprime) = builtexpr; - } - else - { tree forcedexpr = force_gimple_operand (builtexpr, &stmts, true, NULL); - if (is_gimple_min_invariant (forcedexpr)) + if (!is_gimple_min_invariant (forcedexpr)) { - PRE_EXPR_CONSTANT (eprime) = forcedexpr; - } - else - { if (forcedexpr != builtexpr) { VN_INFO_GET (forcedexpr)->valnum = PRE_EXPR_CONSTANT (eprime); On Fri, Oct 17, 2008 at 2:34 PM, Laurent GUERBY wrote: > On Fri, 2008-10-17 at 19:17 +0200, Eric Botcazou wrote: >> > Doesn't break on x86_64-linux-gnu for me (ubuntu hardy), trying >> > i686-pc-linux-gnu. >> >> Really sure? Our x86 and x86-64 testers are down and Laurent Guerby's tester >> on x86-64 hasn't posted anything to gcc-results@ since rev 141181. > > I confirm 141181 was the last to bootstrap c,ada on x86_64, > the next update of the build script led to a failure: > > Fri Oct 17 04:18:33 CEST 2008 > Updating SVN tree > U gcc/DATESTAMP > U gcc/ChangeLog > U gcc/tree-ssa-pre.c > Updated to revision 141186. > ... > > raised STORAGE_ERROR : stack overflow (or erroneous memory access) > gnatmake: "/home/guerby/trunk/gcc/ada/gnatname.adb" compilation error > make[3]: *** [common-tools] Error 4 > make[3]: Leaving directory `/home/guerby/build/gcc/ada/tools' > make[2]: *** [gnattools-native] Error 2 > make[2]: Leaving directory `/home/guerby/build/gnattools' > make[1]: *** [all-gnattools] Error 2 > make[1]: Leaving directory `/home/guerby/build' > make: *** [bootstrap] Error 2 > Fri Oct 17 06:22:24 CEST 2008 > > For reference, the configure line of my build script is: > > ../trunk/configure --prefix=/n/11/guerby/install-trunk > --enable-languages=c,ada --enable-__cxa_atexit --disable-nls > --enable-threads=posix --with-mpfr=/opt/cfarm/mpfr-2.3.1 > > And base version of GCC is "4.1.2 20061115 (prerelease) (Debian > 4.1.1-21)". > > Laurent > > >