From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5259 invoked by alias); 3 Nov 2012 04:42:12 -0000 Received: (qmail 5130 invoked by uid 48); 3 Nov 2012 04:41:52 -0000 From: "hp at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug testsuite/55186] New: gcc.dg/const-uniq-1.c fails due to vector expected but not being in the constant pool Date: Sat, 03 Nov 2012 04:42:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: testsuite X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hp at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-11/txt/msg00195.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55186 Bug #: 55186 Summary: gcc.dg/const-uniq-1.c fails due to vector expected but not being in the constant pool Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: testsuite AssignedTo: unassigned@gcc.gnu.org ReportedBy: hp@gcc.gnu.org Target: cris-axis-elf Created attachment 28601 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28601 const-uniq-1.c.004t.gimple While technically this is a regression, the reason for the brief PASS period is likely related to a temporary severe bug in the source tree rather than the more common sequence: a conscious change foiled by a later bug. This is a rare event! This test previously failed, started passing somewhere in the (]-range 193059:193061 (likely due to the bug in r193061) and started failing again somewhere in the (]-range 193063:193070 (likely due to the bugfix in r193064). At r193109, the const-uniq-1.c.004t.gimple dump is as attached: no label present for the expected constant-pool entry. The assembly output for the vector initializations are piecewise, one for each element: moveq 1,$r9 move.d $r9,[$sp+4] The test assumes a single vector in the constant pool supposedly used with some memcpy-equivalent (call or in-line expansion). At first glance, the piecewise initialization might seem suboptimal, but a memcpy call would *not* be better for -Os for this target, when counting the constant vector (well, twice). Piecewise initialization would be optimal - if the storing instructions use post-increment instead of indexing, as expected by the specified relevant target macros. (N.B.: poor autoincdec generation is a long-standing flaw in gcc covered by PRs elsewhere). Constant-pool vectors and memcpy are optimal for e.g. vectors four times as large; will propose such a patch for this test-case.