testsuite: Add check for overflowed IMEM region to testsuite
authorDimitar Dimitrov <dimitar@dinux.eu>
Wed, 12 Jun 2019 19:36:34 +0000 (19:36 +0000)
committerDimitar Dimitrov <dimitar@gcc.gnu.org>
Wed, 12 Jun 2019 19:36:34 +0000 (19:36 +0000)
gcc/testsuite/ChangeLog:

2019-06-12  Dimitar Dimitrov  <dimitar@dinux.eu>

* lib/gcc-dg.exp: Bail on region overflow for tiny targets.
* lib/target-utils.exp: Ditto.
* lib/target-supports.exp: Declare PRU target as tiny.

From-SVN: r272206

gcc/testsuite/ChangeLog
gcc/testsuite/lib/target-supports.exp
gcc/testsuite/lib/target-utils.exp

index 79f4952f1419a8a4df97ac9301b6347b4a4dd7fb..10e6551f74ccb5fd87d28f7ff017ccdf79a1e1ee 100644 (file)
@@ -1,3 +1,9 @@
+2019-06-12  Dimitar Dimitrov  <dimitar@dinux.eu>
+
+       * lib/gcc-dg.exp: Bail on region overflow for tiny targets.
+       * lib/target-utils.exp: Ditto.
+       * lib/target-supports.exp: Declare PRU target as tiny.
+
 2019-06-12  Dimitar Dimitrov  <dimitar@dinux.eu>
 
        * gcc.target/pru/abi-arg-struct.c: New test.
index b60eab6d75dedd76e4b5db66b5bd8bd9a21e4106..2b3290619dcdb2996b5c2cd28eaa3a03415ae1f5 100644 (file)
@@ -8765,6 +8765,11 @@ proc check_effective_target_tiny {} {
            && [check_effective_target_avr_tiny] } {
           return 1
       }
+      # PRU Program Counter is 16-bits, and trampolines are not supported.
+      # Hence directly declare as a tiny target.
+      if [istarget pru-*-*] {
+          return 1
+      }
       return 0
     }]
 }
index e847fdd42796583ee9b956a2ff993e1f42bb503c..23137d4702cceffdabdfad8b499a266b56248956 100644 (file)
@@ -35,6 +35,10 @@ proc ${tool}_check_unsupported_p { output } {
           && [check_effective_target_tiny] } {
         return "memory full"
      }
+    if { [regexp "(^|\n)\[^\n\]*: region \[^\n\]* overflowed" $output]
+          && [check_effective_target_tiny] } {
+       return "memory full"
+    }
 
     if { [istarget spu-*-*] && \
             [string match "*exceeds local store*" $output] } {