From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9438 invoked by alias); 18 Jan 2013 10:04:39 -0000 Received: (qmail 9412 invoked by uid 22791); 18 Jan 2013 10:04:38 -0000 X-SWARE-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-wg0-f44.google.com (HELO mail-wg0-f44.google.com) (74.125.82.44) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 18 Jan 2013 10:04:34 +0000 Received: by mail-wg0-f44.google.com with SMTP id dr12so2065420wgb.11 for ; Fri, 18 Jan 2013 02:04:33 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.195.13.11 with SMTP id eu11mr13113170wjd.39.1358503472942; Fri, 18 Jan 2013 02:04:32 -0800 (PST) Received: by 10.194.179.130 with HTTP; Fri, 18 Jan 2013 02:04:32 -0800 (PST) In-Reply-To: References: Date: Fri, 18 Jan 2013 10:04:00 -0000 Message-ID: Subject: Re: [PATCH] Fix ICE in vectorization dump (PR tree-optimization/55995) From: Richard Biener To: Sharad Singhai Cc: janis@gcc.gnu.org, "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset=ISO-8859-1 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: 2013-01/txt/msg00942.txt.bz2 On Fri, Jan 18, 2013 at 9:51 AM, Sharad Singhai wrote: > This patch fixes an ICE in vectorization dump when section anchors are present. > > Bootstrapped/tested on x86_64 and PPC 64 and found no new failures. OK > for trunk? Ok. Thanks, Richard. > Thanks, > Sharad > > 2013-01-18 Sharad Singhai > > PR tree-optimization/55995 > * dumpfile.c (dump_loc): Print location only if available. > * testsuite/gcc.dg/vect/vect.exp: Use "details" flags for dump info. > * tree-vectorizer.c (increase_alignment): Intialize vect_location. > > Index: dumpfile.c > =================================================================== > --- dumpfile.c (revision 195244) > +++ dumpfile.c (working copy) > @@ -260,14 +260,13 @@ dump_loc (int dump_kind, FILE *dfile, source_locat > /* Currently vectorization passes print location information. */ > if (dump_kind) > { > - if (loc == UNKNOWN_LOCATION) > + if (loc != UNKNOWN_LOCATION) > + fprintf (dfile, "\n%s:%d: note: ", LOCATION_FILE (loc), > + LOCATION_LINE (loc)); > + else if (current_function_decl) > fprintf (dfile, "\n%s:%d: note: ", > DECL_SOURCE_FILE (current_function_decl), > DECL_SOURCE_LINE (current_function_decl)); > - else > - fprintf (dfile, "\n%s:%d: note: ", > - LOCATION_FILE (loc), > - LOCATION_LINE (loc)); > } > } > > Index: testsuite/gcc.dg/vect/vect.exp > =================================================================== > --- testsuite/gcc.dg/vect/vect.exp (revision 195244) > +++ testsuite/gcc.dg/vect/vect.exp (working copy) > @@ -156,7 +156,8 @@ dg-runtest [lsort [glob -nocomplain $srcdir/$subdi > > # alignment-sensitive -fsection-anchors tests > set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS > -lappend DEFAULT_VECTCFLAGS "-fsection-anchors" "-fdump-ipa-increase_alignment" > +lappend DEFAULT_VECTCFLAGS "-fsection-anchors" \ > + "-fdump-ipa-increase_alignment-details" > dg-runtest [lsort [glob -nocomplain > $srcdir/$subdir/aligned-section-anchors-*.\[cS\]]] \ > "" $DEFAULT_VECTCFLAGS > > Index: tree-vectorizer.c > =================================================================== > --- tree-vectorizer.c (revision 195244) > +++ tree-vectorizer.c (working copy) > @@ -225,6 +225,8 @@ increase_alignment (void) > { > struct varpool_node *vnode; > > + vect_location = UNKNOWN_LOC; > + > /* Increase the alignment of all global arrays for vectorization. */ > FOR_EACH_DEFINED_VARIABLE (vnode) > {