1# Copyright (C) 2014-2018 Free Software Foundation, Inc. 2 3# This program is free software; you can redistribute it and/or modify 4# it under the terms of the GNU General Public License as published by 5# the Free Software Foundation; either version 3 of the License, or 6# (at your option) any later version. 7# 8# This program is distributed in the hope that it will be useful, 9# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# GNU General Public License for more details. 12# 13# You should have received a copy of the GNU General Public License 14# along with GCC; see the file COPYING3. If not see 15# <http://www.gnu.org/licenses/>. 16 17# 18# ${tool}_check_unsupported_p -- Check the compiler(/assembler/linker) output 19# for text indicating that the testcase should be marked as "unsupported" 20# 21# When dealing with a large number of tests, it's difficult to weed out the 22# ones that are too big for a particular cpu (eg: 16 bit with a small amount 23# of memory). There are various ways to deal with this. Here's one. 24# Fortunately, all of the cases where this is likely to happen will be using 25# gld so we can tell what the error text will look like. 26# 27 28load_lib target-supports.exp 29 30proc ${tool}_check_unsupported_p { output } { 31 if [regexp "(^|\n)\[^\n\]*: region \[^\n\]* is full" $output] { 32 return "memory full" 33 } 34 if { [regexp "(^|\n)\[^\n\]*: relocation truncated to fit" $output] 35 && [check_effective_target_tiny] } { 36 return "memory full" 37 } 38 39 if { [istarget spu-*-*] && \ 40 [string match "*exceeds local store*" $output] } { 41 return "memory full" 42 } 43 return "" 44} 45