On Jul 22, 2014, at 4:01 AM, Kyrill Tkachov <kyrylo.tkac...@arm.com> wrote:
> These tests use very large arrays as part of their loop interchange testing 
> so they don't fit into the 1MiB binary size limit imposed by -mcmodel=tiny. 
> This causes errors at link-time.

> Ok to commit?

So the test suite should be used to figure this out as marking the individual 
test cases is a never ending and ever changing.  I can a big test case on my 
system, and found:

ld: address 0xc401ad0 of a.out section `.data' is not within region `SRAM'
ld: a.out section `.ctors' will not fit in region `SRAM'
ld: address 0xc401ad0 of a.out section `.data' is not within region `SRAM'
ld: region `SRAM' overflowed by 155196160 bytes

for large test cases.  After looking at the current gld sources, it seems that 
they merely changed the spelling of the error message and we’ve not kept up.  
Please try the patch below and tell me if it works for you.  If it doesn’t, 
what messages do you see and what tool are they from?  Vendor, program and 
version would be nice to know. 

If it works, feel free to check it in.  If you want to replicate the 4 lines 
and add a case for the vendor’s tool, that’d be a better way to handle it.  The 
below should handle a variety of GNU ld situations (but not all of them).


diff --git a/gcc/testsuite/lib/gcc-defs.exp b/gcc/testsuite/lib/gcc-defs.exp
index 69a5971..58c6a9f 100644
--- a/gcc/testsuite/lib/gcc-defs.exp
+++ b/gcc/testsuite/lib/gcc-defs.exp
@@ -154,7 +154,7 @@ proc ${tool}_exit { } {
 #
 
 proc ${tool}_check_unsupported_p { output } {
-    if [regexp "(^|\n)\[^\n\]*: region \[^\n\]* is full" $output] {
+    if [regexp "(^|\n)\[^\n\]*: region \[^\n\]* (is full|overflowed by )" 
$output] {
        return "memory full"
     }
     if { [istarget spu-*-*] && \
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index a758d47..bc6ba97 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -225,10 +225,11 @@ proc gcc-dg-prune { system text } {
        }
     }
 
-    # If we see "region xxx is full" then the testcase is too big for ram.
-    # This is tricky to deal with in a large testsuite like c-torture so
-    # deal with it here.  Just mark the testcase as unsupported.
-    if [regexp "(^|\n)\[^\n\]*: region \[^\n\]* is full" $text] {
+    # If we see "region xxx is full" or "region xxx overflowed by "
+    # then the testcase is too big for ram.  This is tricky to deal
+    # with in a large testsuite like c-torture so deal with it here.
+    # Just mark the testcase as unsupported.
+    if [regexp "(^|\n)\[^\n\]*: region \[^\n\]* (is full|overflowed by )" 
$text] {
        # The format here is important.  See dg.exp.
        return "::unsupported::memory full"
     }
diff --git a/gcc/testsuite/lib/objc.exp b/gcc/testsuite/lib/objc.exp
index 5ecefa9..6a1c2e7 100644
--- a/gcc/testsuite/lib/objc.exp
+++ b/gcc/testsuite/lib/objc.exp
@@ -354,7 +354,7 @@ if { [info procs prune_warnings] == "" } then {
 # gld so we can tell what the error text will look like.
 
 proc ${tool}_check_unsupported_p { output } {
-    if [regexp "(^|\n)\[^\n\]*: region \[^\n\]* is full" $output] {
+    if [regexp "(^|\n)\[^\n\]*: region \[^\n\]* (is full|overflowed by )" 
$output] {
        return "memory full"
     }
     return ""

Reply via email to