diff mbox

Fix PR68838

Message ID CAGWvny=+UmbGPr48Oh-cZj9LzwaiFwLtd2q6Z+n48_-ViYwMtw@mail.gmail.com
State New
Headers show

Commit Message

David Edelsohn Nov. 29, 2016, 5:47 p.m. UTC
Separate from ulimit, 32 bit AIX processes have the concept of memory
segments.  By default, AIX devotes one 256MB segment to the data
section of an executable.  Some libstdc++ testcases allocate more than
that amount of memory.  Instead of individually fixing tests, this
patch always adds the AIX linker option to allocate two segments for
data, fixing a number of wchar testcases.

PR libstdc++/68838
* testsuite/lib/libstdc++.exp (DEFAULT_CXXFLAGS): Add -Wl,-bmaxdata on AIX.
* testsuite/23_containers/vector/profile/vector.cc: Remove
dg-additional-options.

 #define ITERATIONS 2000
diff mbox

Patch

Index: libstdc++.exp
===================================================================
--- libstdc++.exp       (revision 242964)
+++ libstdc++.exp       (working copy)
@@ -136,6 +136,9 @@ 
        if { [string match "powerpc-*-darwin*" $target_triplet] } {
            append DEFAULT_CXXFLAGS " -multiply_defined suppress"
        }
+       if { [string match "powerpc-ibm-aix*" $target_triplet] }
+           append DEFAULT_CXXFLAGS " -Wl,-bmaxdata:0x20000000"
+       }
     }

    v3track DEFAULT_CXXFLAGS 2

Index: 23_containers/vector/profile/vector.cc
===================================================================
--- 23_containers/vector/profile/vector.cc      (revision 242964)
+++ 23_containers/vector/profile/vector.cc      (working copy)
@@ -2,8 +2,6 @@ 
 // Advice: set tmp as 10000

 // { dg-options "-DITERATIONS=20" { target simulator } }
-// AIX requires higher memory limit
-// { dg-additional-options "-Wl,-bmaxdata:0x20000000" { target {
powerpc-ibm-aix* } } }

 #ifndef ITERATIONS