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: unassig...@gcc.gnu.org ReportedBy: h...@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.