aboutsummaryrefslogtreecommitdiff
path: root/libiberty/testsuite
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2011-08-06 18:40:27 +0000
committerDJ Delorie <dj@redhat.com>2011-08-06 18:40:27 +0000
commit6b6bd65aa5c27687304cd4add13ff1910ef349f7 (patch)
tree71292ff48728b04fd86c7f59eca7651c23be9847 /libiberty/testsuite
parent2f7fb8e4c8d23a52f0ca284beeebc248aa63baaf (diff)
downloadbinutils-6b6bd65aa5c27687304cd4add13ff1910ef349f7.zip
binutils-6b6bd65aa5c27687304cd4add13ff1910ef349f7.tar.gz
binutils-6b6bd65aa5c27687304cd4add13ff1910ef349f7.tar.bz2
merge from gcc
Diffstat (limited to 'libiberty/testsuite')
-rw-r--r--libiberty/testsuite/demangle-expected4
-rw-r--r--libiberty/testsuite/test-expandargv.c7
2 files changed, 9 insertions, 2 deletions
diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected
index f9e8447..3737cfd 100644
--- a/libiberty/testsuite/demangle-expected
+++ b/libiberty/testsuite/demangle-expected
@@ -3901,6 +3901,10 @@ java resource java/util/iso4217.properties
--format=gnu-v3
_Z3addIidEDTplfp_fp0_ET_T0_
decltype ({parm#1}+{parm#2}) add<int, double>(int, double)
+# decltype scope test
+--format=gnu-v3
+_Z1fI1SENDtfp_E4typeET_
+decltype ({parm#1})::type f<S>(S)
# decltype/fn call test
--format=gnu-v3
_Z4add3IidEDTclL_Z1gEfp_fp0_EET_T0_
diff --git a/libiberty/testsuite/test-expandargv.c b/libiberty/testsuite/test-expandargv.c
index 57b96b3..dff20d4 100644
--- a/libiberty/testsuite/test-expandargv.c
+++ b/libiberty/testsuite/test-expandargv.c
@@ -189,7 +189,7 @@ writeout_test (int test, const char * test_data)
{
char filename[256];
FILE *fd;
- size_t len;
+ size_t len, sys_fwrite;
char * parse;
/* Unique filename per test */
@@ -208,7 +208,10 @@ writeout_test (int test, const char * test_data)
/* Run all possible replaces */
run_replaces (parse);
- fwrite (parse, len, sizeof (char), fd);
+ sys_fwrite = fwrite (parse, sizeof (char), len, fd);
+ if (sys_fwrite != len)
+ fatal_error (__LINE__, "Failed to write to test file.", errno);
+
free (parse);
fclose (fd);
}