Bug 21554 - [4.0/4.1/4.2 Regression] ext/array_allocator/2.cc execution fails
Summary: [4.0/4.1/4.2 Regression] ext/array_allocator/2.cc execution fails
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 4.0.1
: P5 normal
Target Milestone: 4.1.0
Assignee: Paolo Carlini
URL:
Keywords:
Depends on: 19495
Blocks:
  Show dependency treegraph
 
Reported: 2005-05-13 19:23 UTC by Joseph S. Myers
Modified: 2006-02-01 22:01 UTC (History)
5 users (show)

See Also:
Host:
Target: hppa64-hpux, sparc64-solaris
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-06-01 08:33:42


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph S. Myers 2005-05-13 19:23:29 UTC
The failure
FAIL: ext/array_allocator/2.cc execution test
appeared on 4.0 branch on hppa64-hpux with the patch
http://gcc.gnu.org/ml/gcc-cvs/2005-05/msg00433.html

2005-05-09  Benjamin Kosnik  <bkoz@redhat.com>

        * docs/html/test.html: Update.
        * testsuite/printnow.c: Remove.
        * scripts/check_survey.in: Remove.

        * testsuite/abi_check.cc: To...
        * testuite/testsuite_abi_check.cc: ...here.
        * testsuite/testsuite_abi.h (compare_symbols): Return int.
        * testsuite/testsuite_abi.cc: Same.
        
        * testsuite/testsuite_hooks.h: Move character related bits to...
        * testsuite/testsuite_character.h: ...here.
        * testsuite/testsuite_character.cc: ... and here.
        [...]
Comment 1 Joseph S. Myers 2005-05-13 19:27:53 UTC
What was the purpose of applying this patch to 4.0 branch?  Did it fix a
regression?  I can't find this patch (looking for the ChangeLog entry test) in
my gcc-patches folders.

As the patch changes the testsuite harness it changes what each test tests so
the appearance of a FAIL might or might not strictly be a regression (depending
on whether the same test and harness combination fail or pass with older
compiler versions) but it seems undesirable on a release branch.
Comment 2 Paolo Carlini 2005-05-13 20:16:38 UTC
Given our current basic_string implementation (which I'm maintaining) I can
tell you that this testcase is very brittle: see 19495, that lead to the
xfail for powerpc, for additional details. Benjamin's changes cannot have
directly caused the fail and, IMHO, represent a very welcome clean-up.
Comment 3 jsm-csl@polyomino.org.uk 2005-05-13 20:39:30 UTC
Subject: Re:  [4.0 Regression] ext/array_allocator/2.cc
 execution test fails on hppa64-hpux

On Fri, 13 May 2005, pcarlini at suse dot de wrote:

> Given our current basic_string implementation (which I'm maintaining) I can
> tell you that this testcase is very brittle: see 19495, that lead to the
> xfail for powerpc, for additional details. Benjamin's changes cannot have
> directly caused the fail and, IMHO, represent a very welcome clean-up.

So this should be treated as a known latent bug, a testcase which fails or 
passes at random on targets requiring strict alignment?  In which case 
there should be an effective-target keyword for strict alignment and the 
testcase should be xfailed on all such targets?

Comment 4 Paolo Carlini 2005-05-13 21:13:46 UTC
> So this should be treated as a known latent bug, a testcase which fails or 
> passes at random on targets requiring strict alignment?  In which case 
> there should be an effective-target keyword for strict alignment and the 
> testcase should be xfailed on all such targets?

Yes, I think the testcase should be simply xfaild on targets requiring strict 
alignment, that is, requiring alignment strictly > alignment(char) for memory
involved in atomic operations. Currently (*) basic_string doesn't rebind the
passed allocator to one sufficiently aligned for atomic memory, sadly.

(*) Since we don't want to break the library ABI anytime soon, probably I
will try again to fix this long standing bug within v6 (while also keep on
working on the next basic_string in v7).
Comment 5 Eric Botcazou 2005-06-01 08:33:41 UTC
Confirmed on SPARC/Solaris 64-bit.
Comment 6 Paolo Carlini 2005-06-01 08:43:18 UTC
Eric, if you are willing to prepare a patchlet xfailing the testcase on
"strict-alignment" targets, whatever that means (*), I would be grateful.

(*) Actually, in case of hppa64 the alignment is insufficient for the
size_t length and capacity fields. In other cases (powerpc) can be the
atomic memory for the reference-count. In any case, I don't think we
can fix this problem without changing basic_string in a binary
incompatible way vs other so.6 releases, unfortunately. Certainly, not
for 4.0.x.
Comment 7 Eric Botcazou 2005-10-22 08:29:50 UTC
Present on mainline for SPARC 64-bit too:
http://gcc.gnu.org/ml/gcc-testresults/2005-10/msg00788.html
Comment 8 Christian Joensson 2005-10-22 11:49:17 UTC
oops, sorry, present on sparc/sparc64 linux too, see, e.g, 

http://gcc.gnu.org/ml/gcc-testresults/2005-10/msg00927.html
Comment 9 Christian Joensson 2005-10-22 11:50:05 UTC
(In reply to comment #8)
> oops, sorry, present on sparc/sparc64 linux too, see, e.g, 
> http://gcc.gnu.org/ml/gcc-testresults/2005-10/msg00927.html

hmm, make that sparc64....
Comment 10 paolo@gcc.gnu.org 2006-01-31 17:46:11 UTC
Subject: Bug 21554

Author: paolo
Date: Tue Jan 31 17:46:07 2006
New Revision: 110445

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110445
Log:
2006-01-31  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/21554
	* include/tr1/array (array<>::_M_instance): Maximally align.
	* testsuite/ext/array_allocator/2.cc: Do not xfail for powerpc.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/tr1/array
    trunk/libstdc++-v3/testsuite/ext/array_allocator/2.cc

Comment 11 paolo@gcc.gnu.org 2006-02-01 21:57:52 UTC
Subject: Bug 21554

Author: paolo
Date: Wed Feb  1 21:57:48 2006
New Revision: 110482

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110482
Log:
2006-02-01  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/21554
	* include/tr1/array (array<>::_M_instance): Maximally align.
	* testsuite/ext/array_allocator/2.cc: Do not xfail for powerpc.

Modified:
    branches/gcc-4_1-branch/libstdc++-v3/ChangeLog
    branches/gcc-4_1-branch/libstdc++-v3/include/std/std_bitset.h
    branches/gcc-4_1-branch/libstdc++-v3/include/tr1/array
    branches/gcc-4_1-branch/libstdc++-v3/testsuite/ext/array_allocator/2.cc

Comment 12 Paolo Carlini 2006-02-01 22:01:43 UTC
Fixed for 4.1.0 and mainline. Will not fix in 4_0-branch.