diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-01-11 15:05:18 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-01-11 15:05:18 +0000 |
commit | 20ffc31a8ce80a52d3fb19765ae610b9be952cb9 (patch) | |
tree | 3060ad328d19c224da701cb4ef89e5b1f70b0664 /gcc/testsuite | |
parent | 05725ee3a112c033c7b2885441e5832a29e07c29 (diff) | |
download | gcc-20ffc31a8ce80a52d3fb19765ae610b9be952cb9.tar.gz |
2013-01-11 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 195106 using svnmerge.py
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@195108 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
291 files changed, 1819 insertions, 446 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 217e40fc7da..df0378f1d12 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,218 @@ +2012-01-11 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/44061 + * gcc.dg/pr44061.c: New testcase. + +2013-01-10 Richard Sandiford <rdsandiford@googlemail.com> + + Update copyright years + +2013-01-10 Aldy Hernandez <aldyh@redhat.com> + Jakub Jelinek <jakub@redhat.com> + + PR target/55565 + * gcc.target/powerpc/ppc-mov-1.c: Update scan-assembler-not + regex. + +2013-01-10 Vladimir Makarov <vmakarov@redhat.com> + + PR rtl-optimization/pr55672 + * gcc.target/i386/pr55672.c: New. + +2013-01-10 Jeff Law <law@redhat.com> + + * gcc/dg/tree-ssa/vrp06.c: Tighten expected output. Make each + pass/fail message unique. + + +2013-01-10 Jason Merrill <jason@redhat.com> + + * ada/.gitignore: New. + +2013-01-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * g++.dg/tls/thread_local-cse.C: Don't xfail on *-*-solaris2.9. + Add tls options. + * g++.dg/tls/thread_local2.C: Likewise. + * g++.dg/tls/thread_local2g.C: Likewise. + * g++.dg/tls/thread_local6.C: Likewise. + * g++.dg/tls/thread_local-order1.C: Add tls options. + * g++.dg/tls/thread_local-order2.C: Likewise. + * g++.dg/tls/thread_local3.C: Likewise. + * g++.dg/tls/thread_local3g.C: Likewise. + * g++.dg/tls/thread_local4.C: Likewise. + * g++.dg/tls/thread_local4g.C: Likewise. + * g++.dg/tls/thread_local5.C: Likewise. + * g++.dg/tls/thread_local5g.C: Likewise. + * g++.dg/tls/thread_local6g.C: Likewise. + +2013-01-10 Kostya Serebryany <kcc@google.com> + + * g++.dg/asan/asan_test.cc: Sync from upstream. + +2013-01-10 Jakub Jelinek <jakub@redhat.com> + + PR tree-optimization/55921 + * gcc.c-torture/compile/pr55921.c: New test. + +2013-01-09 Jan Hubicka <jh@suse.cz> + + PR tree-optimization/55569 + * gcc.c-torture/compile/pr55569.c: New testcase. + +2013-01-09 Mikael Morin <mikael@gcc.gnu.org> + + PR fortran/47203 + * gfortran.dg/use_28.f90: New test. + +2012-01-09 Uros Bizjak <ubizjak@gmail.com> + + * gfortran.dg/intrinsic_size_3.f90: Make scan-tree-dump-times + number matching more robust. + +2013-01-09 Vladimir Makarov <vmakarov@redhat.com> + + PR rtl-optimization/55829 + * gcc.target/i386/pr55829.c: New. + +2013-01-09 Tobias Burnus <burnus@net-b.de> + + PR fortran/55758 + * gfortran.dg/bind_c_bool_1.f90: New. + * gfortran.dg/do_5.f90: Add dg-warning. + +2013-01-09 Jan Hubicka <jh@suse.cz> + + PR tree-optimiation/55875 + * gcc.c-torture/execute/pr55875.c: New testcase. + * g++.dg/torture/pr55875.C: New testcase. + +2013-01-09 Jakub Jelinek <jakub@redhat.com> + + PR c/48418 + * c-c++-common/pr48418.c: New test. + +2013-01-09 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/55801 + * g++.dg/tls/thread_local-ice.C: New. + +2013-01-09 Andreas Schwab <schwab@suse.de> + + * gcc.dg/guality/pr54693.c: Null-terminate arr. + +2013-01-09 Jakub Jelinek <jakub@redhat.com> + + PR tree-optimization/48189 + * gcc.dg/pr48189.c: New test. + +2013-01-04 Jan Hubicka <jh@suse.cz> + + PR tree-optimization/55823 + * g++.dg/ipa/devirt-10.C: New testcase. + +2012-01-08 Uros Bizjak <ubizjak@gmail.com> + Vladimir Yakovlev <vladimir.b.yakovlev@intel.com> + + PR rtl-optimization/55845 + * gcc.target/i386/pr55845.c: New test. + +2013-01-08 Tejas Belagod <tejas.belagod@arm.com> + + * gcc.target/aarch64/vect-mull-compile.c: Explicitly scan for + instructions generated instead of number of occurances. + +2013-01-08 James Greenhalgh <james.greenhalgh@arm.com> + + * gcc/testsuite/gcc.target/aarch64/vect-fcm-eq-d.c: New. + * gcc/testsuite/gcc.target/aarch64/vect-fcm-eq-f.c: Likewise. + * gcc/testsuite/gcc.target/aarch64/vect-fcm-ge-d.c: Likewise. + * gcc/testsuite/gcc.target/aarch64/vect-fcm-ge-f.c: Likewise. + * gcc/testsuite/gcc.target/aarch64/vect-fcm-gt-d.c: Likewise. + * gcc/testsuite/gcc.target/aarch64/vect-fcm-gt-f.c: Likewise. + * gcc/testsuite/gcc.target/aarch64/vect-fcm.x: Likewise. + * gcc/testsuite/lib/target-supports.exp + (check_effective_target_vect_cond): Enable for AArch64. + +2013-01-08 James Greenhalgh <james.greenhalgh@arm.com> + + * gcc.target/aarch64/vsqrt.c (test_square_root_v2sf): Use + endian-safe float pool loading. + (test_square_root_v4sf): Likewise. + (test_square_root_v2df): Likewise. + * lib/target-supports.exp + (check_effective_target_vect_call_sqrtf): Add AArch64. + +2013-01-08 Martin Jambor <mjambor@suse.cz> + + PR debug/55579 + * gcc.dg/tree-ssa/pr55579.c: New test. + +2013-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * g++.dg/debug/dwarf2/pr54508.C: Allow for more whitespace after + asm comments. + +2013-01-08 Jakub Jelinek <jakub@redhat.com> + + PR middle-end/55890 + * gcc.dg/torture/pr55890-3.c: New test. + + PR middle-end/55851 + * gcc.c-torture/compile/pr55851.c: New test. + + PR sanitizer/55844 + * c-c++-common/asan/null-deref-1.c: Add -fno-shrink-wrap to + dg-options. + +2013-01-08 Paul Thomas <pault@gcc.gnu.org> + + PR fortran/55618 + * gfortran.dg/elemental_scalar_args_2.f90: New test. + +2013-01-07 Tobias Burnus <burnus@net-b.de> + + PR fortran/55763 + * gfortran.dg/pointer_init_2.f90: Update dg-error. + * gfortran.dg/pointer_init_7.f90: New. + +2013-01-07 Richard Biener <rguenther@suse.de> + + * gcc.dg/lto/pr55525_0.c (s): Size like char *. + +2013-01-07 Richard Biener <rguenther@suse.de> + + PR middle-end/55890 + * gcc.dg/torture/pr55890-1.c: New testcase. + * gcc.dg/torture/pr55890-2.c: Likewise. + +2013-01-07 James Greenhalgh <james.greenhalgh@arm.com> + + * gcc.target/aarch64/fmovd.c: New. + * gcc.target/aarch64/fmovf.c: Likewise. + * gcc.target/aarch64/fmovd-zero.c: Likewise. + * gcc.target/aarch64/fmovf-zero.c: Likewise. + * gcc.target/aarch64/vect-fmovd.c: Likewise. + * gcc.target/aarch64/vect-fmovf.c: Likewise. + * gcc.target/aarch64/vect-fmovd-zero.c: Likewise. + * gcc.target/aarch64/vect-fmovf-zero.c: Likewise. + +2013-01-07 Richard Biener <rguenther@suse.de> + + PR tree-optimization/55888 + PR tree-optimization/55862 + * gcc.dg/torture/pr55888.c: New testcase. + +2013-01-07 Tobias Burnus <burnus@net-b.de> + + PR fortran/55852 + * gfortran.dg/intrinsic_size_3.f90: New. + +2012-01-07 Tobias Burnus <burnus@net-b.de> + + PR fortran/55763 + * gfortran.dg/select_type_32.f90: New. + 2013-01-04 Dodji Seketeli <dodji@redhat.com> PR c++/52343 @@ -5,9 +220,9 @@ 2013-01-06 Paul Thomas <pault@gcc.gnu.org> - PR fortran/PR53876 - PR fortran/PR54990 - PR fortran/PR54992 + PR fortran/53876 + PR fortran/54990 + PR fortran/54992 * gfortran.dg/class_array_15.f03: New test. 2013-01-06 Mikael Morin <mikael@gcc.gnu.org> diff --git a/gcc/testsuite/ChangeLog-1993-2007 b/gcc/testsuite/ChangeLog-1993-2007 index d15b8f1b082..cf9bb00ba82 100644 --- a/gcc/testsuite/ChangeLog-1993-2007 +++ b/gcc/testsuite/ChangeLog-1993-2007 @@ -60910,8 +60910,7 @@ rlsruhe.de> * New file. -Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +Copyright (C) 1993-2007 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff --git a/gcc/testsuite/ChangeLog.ptr b/gcc/testsuite/ChangeLog.ptr index 2c9bed875d3..e61330fe479 100644 --- a/gcc/testsuite/ChangeLog.ptr +++ b/gcc/testsuite/ChangeLog.ptr @@ -58,7 +58,7 @@ have a cast which is PREd. -Copyright (C) 2006, 2007 Free Software Foundation, Inc. +Copyright (C) 2006-2007 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff --git a/gcc/testsuite/ChangeLog.tree-ssa b/gcc/testsuite/ChangeLog.tree-ssa index 7d1029c5b71..fa5b2d45012 100644 --- a/gcc/testsuite/ChangeLog.tree-ssa +++ b/gcc/testsuite/ChangeLog.tree-ssa @@ -1204,7 +1204,7 @@ * gcc.c-torture/execute/20020819-1.c: Add exit(0). -Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +Copyright (C) 2002-2004 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff --git a/gcc/testsuite/README b/gcc/testsuite/README index 7b41475682c..c14b4d5cd0e 100644 --- a/gcc/testsuite/README +++ b/gcc/testsuite/README @@ -61,7 +61,7 @@ where testsuite directory. -Copyright (C) 1998, 1999, 2000, 2003, 2005 Free Software Foundation, Inc. +Copyright (C) 1998-2013 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff --git a/gcc/testsuite/README.compat b/gcc/testsuite/README.compat index 7eee66d1c03..d24a08a6814 100644 --- a/gcc/testsuite/README.compat +++ b/gcc/testsuite/README.compat @@ -85,7 +85,7 @@ Janis Johnson, <janis187@us.ibm.com> October 2002 -Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +Copyright (C) 2002-2013 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff --git a/gcc/testsuite/README.gcc b/gcc/testsuite/README.gcc index 998c2d9e500..d564bd14a59 100644 --- a/gcc/testsuite/README.gcc +++ b/gcc/testsuite/README.gcc @@ -80,7 +80,7 @@ For execution tests, put them in execute. If a test does not fit into the torture framework, use the dg framework. -Copyright (C) 1997, 1998, 2004 Free Software Foundation, Inc. +Copyright (C) 1997-2013 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff --git a/gcc/testsuite/ada/.gitignore b/gcc/testsuite/ada/.gitignore new file mode 100644 index 00000000000..a499072f4e5 --- /dev/null +++ b/gcc/testsuite/ada/.gitignore @@ -0,0 +1,2 @@ +# In the Ada testsuite, .a is an ada source file, not a library. +!*.a diff --git a/gcc/testsuite/c-c++-common/asan/null-deref-1.c b/gcc/testsuite/c-c++-common/asan/null-deref-1.c index 6a849bf6f56..2eee98621bf 100644 --- a/gcc/testsuite/c-c++-common/asan/null-deref-1.c +++ b/gcc/testsuite/c-c++-common/asan/null-deref-1.c @@ -1,5 +1,5 @@ /* { dg-do run } */ -/* { dg-options "-fno-omit-frame-pointer" } */ +/* { dg-options "-fno-omit-frame-pointer -fno-shrink-wrap" } */ /* { dg-additional-options "-mno-omit-leaf-frame-pointer" { target { i?86-*-* x86_64-*-* } } } */ /* { dg-shouldfail "asan" } */ diff --git a/gcc/testsuite/c-c++-common/pr48418.c b/gcc/testsuite/c-c++-common/pr48418.c new file mode 100644 index 00000000000..95ff855b89c --- /dev/null +++ b/gcc/testsuite/c-c++-common/pr48418.c @@ -0,0 +1,20 @@ +/* PR c/48418 */ +/* { dg-do compile } */ +/* { dg-options "-Wall -O2" } */ + +int +foo (int x) +{ + const int a = sizeof (int) * __CHAR_BIT__; + const int b = -7; + int c = 0; + c += x << a; /* { dg-warning "left shift count >= width of type" } */ + c += x << b; /* { dg-warning "left shift count is negative" } */ + c += x << (sizeof (int) * __CHAR_BIT__); /* { dg-warning "left shift count >= width of type" } */ + c += x << -7; /* { dg-warning "left shift count is negative" } */ + c += x >> a; /* { dg-warning "right shift count >= width of type" } */ + c += x >> b; /* { dg-warning "right shift count is negative" } */ + c += x >> (sizeof (int) * __CHAR_BIT__); /* { dg-warning "right shift count >= width of type" } */ + c += x >> -7; /* { dg-warning "right shift count is negative" } */ + return c; +} diff --git a/gcc/testsuite/config/default.exp b/gcc/testsuite/config/default.exp index 7e8b7856112..d22df7f25b8 100644 --- a/gcc/testsuite/config/default.exp +++ b/gcc/testsuite/config/default.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2007 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/g++.dg/README b/gcc/testsuite/g++.dg/README index fe308a54210..6ff70ce3e4e 100644 --- a/gcc/testsuite/g++.dg/README +++ b/gcc/testsuite/g++.dg/README @@ -33,7 +33,7 @@ special Tests that need custom expect code to run them; see special/ecos.exp for an example. -Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +Copyright (C) 2001-2013 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff --git a/gcc/testsuite/g++.dg/asan/asan.exp b/gcc/testsuite/g++.dg/asan/asan.exp index 59725036489..499be05c3e0 100644 --- a/gcc/testsuite/g++.dg/asan/asan.exp +++ b/gcc/testsuite/g++.dg/asan/asan.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2012 Free Software Foundation, Inc. +# Copyright (C) 2012-2013 Free Software Foundation, Inc. # # This file is part of GCC. # diff --git a/gcc/testsuite/g++.dg/asan/asan_test.cc b/gcc/testsuite/g++.dg/asan/asan_test.cc index 32c2ad2ab2a..9cfa9e04ef8 100644 --- a/gcc/testsuite/g++.dg/asan/asan_test.cc +++ b/gcc/testsuite/g++.dg/asan/asan_test.cc @@ -17,6 +17,15 @@ #include <stdint.h> #include <setjmp.h> #include <assert.h> +#include <algorithm> + +#ifdef __linux__ +# include <sys/prctl.h> +# include <sys/types.h> +# include <sys/stat.h> +# include <fcntl.h> +#include <unistd.h> +#endif #if defined(__i386__) || defined(__x86_64__) #include <emmintrin.h> @@ -242,7 +251,7 @@ void OOBTest() { for (int i = 0; i < (int)(size - sizeof(T) + 1); i++) oob_test<T>(size, i); - for (int i = size - sizeof(T) + 1; i <= (int)(size + 3 * sizeof(T)); i++) { + for (int i = size - sizeof(T) + 1; i <= (int)(size + 2 * sizeof(T)); i++) { const char *str = "is located.*%d byte.*to the right"; int off = i >= size ? (i - size) : 0; @@ -298,6 +307,18 @@ TEST(AddressSanitizer, OOBRightTest) { } } +#if ASAN_ALLOCATOR_VERSION == 2 // Broken with the asan_allocator1 +TEST(AddressSanitizer, LargeOOBRightTest) { + size_t large_power_of_two = 1 << 19; + for (size_t i = 16; i <= 256; i *= 2) { + size_t size = large_power_of_two - i; + char *p = Ident(new char[size]); + EXPECT_DEATH(p[size] = 0, "is located 0 bytes to the right"); + delete [] p; + } +} +#endif // ASAN_ALLOCATOR_VERSION == 2 + TEST(AddressSanitizer, UAF_char) { const char *uaf_string = "AddressSanitizer:.*heap-use-after-free"; EXPECT_DEATH(uaf_test<U1>(1, 0), uaf_string); @@ -456,6 +477,24 @@ TEST(AddressSanitizer, HugeMallocTest) { } #endif +#ifndef __APPLE__ +void MemalignRun(size_t align, size_t size, int idx) { + char *p = (char *)memalign(align, size); + Ident(p)[idx] = 0; + free(p); +} + +TEST(AddressSanitizer, memalign) { + for (int align = 16; align <= (1 << 23); align *= 2) { + size_t size = align * 5; + EXPECT_DEATH(MemalignRun(align, size, -1), + "is located 1 bytes to the left"); + EXPECT_DEATH(MemalignRun(align, size, size + 1), + "is located 1 bytes to the right"); + } +} +#endif + TEST(AddressSanitizer, ThreadedMallocStressTest) { const int kNumThreads = 4; const int kNumIterations = (ASAN_LOW_MEMORY) ? 10000 : 100000; @@ -784,14 +823,39 @@ TEST(AddressSanitizer, Store128Test) { } #endif -static string RightOOBErrorMessage(int oob_distance) { +static string RightOOBErrorMessage(int oob_distance, bool is_write) { assert(oob_distance >= 0); char expected_str[100]; - sprintf(expected_str, "located %d bytes to the right", oob_distance); + sprintf(expected_str, ASAN_PCRE_DOTALL "%s.*located %d bytes to the right", + is_write ? "WRITE" : "READ", oob_distance); return string(expected_str); } -static string LeftOOBErrorMessage(int oob_distance) { +static string RightOOBWriteMessage(int oob_distance) { + return RightOOBErrorMessage(oob_distance, /*is_write*/true); +} + +static string RightOOBReadMessage(int oob_distance) { + return RightOOBErrorMessage(oob_distance, /*is_write*/false); +} + +static string LeftOOBErrorMessage(int oob_distance, bool is_write) { + assert(oob_distance > 0); + char expected_str[100]; + sprintf(expected_str, ASAN_PCRE_DOTALL "%s.*located %d bytes to the left", + is_write ? "WRITE" : "READ", oob_distance); + return string(expected_str); +} + +static string LeftOOBWriteMessage(int oob_distance) { + return LeftOOBErrorMessage(oob_distance, /*is_write*/true); +} + +static string LeftOOBReadMessage(int oob_distance) { + return LeftOOBErrorMessage(oob_distance, /*is_write*/false); +} + +static string LeftOOBAccessMessage(int oob_distance) { assert(oob_distance > 0); char expected_str[100]; sprintf(expected_str, "located %d bytes to the left", oob_distance); @@ -805,44 +869,48 @@ void MemSetOOBTestTemplate(size_t length) { T *array = Ident((T*)malloc(size)); int element = Ident(42); int zero = Ident(0); + void *(*MEMSET)(void *s, int c, size_t n) = Ident(memset); // memset interval inside array - memset(array, element, size); - memset(array, element, size - 1); - memset(array + length - 1, element, sizeof(T)); - memset(array, element, 1); + MEMSET(array, element, size); + MEMSET(array, element, size - 1); + MEMSET(array + length - 1, element, sizeof(T)); + MEMSET(array, element, 1); // memset 0 bytes - memset(array - 10, element, zero); - memset(array - 1, element, zero); - memset(array, element, zero); - memset(array + length, 0, zero); - memset(array + length + 1, 0, zero); + MEMSET(array - 10, element, zero); + MEMSET(array - 1, element, zero); + MEMSET(array, element, zero); + MEMSET(array + length, 0, zero); + MEMSET(array + length + 1, 0, zero); // try to memset bytes to the right of array - EXPECT_DEATH(memset(array, 0, size + 1), - RightOOBErrorMessage(0)); - EXPECT_DEATH(memset((char*)(array + length) - 1, element, 6), - RightOOBErrorMessage(4)); - EXPECT_DEATH(memset(array + 1, element, size + sizeof(T)), - RightOOBErrorMessage(2 * sizeof(T) - 1)); + EXPECT_DEATH(MEMSET(array, 0, size + 1), + RightOOBWriteMessage(0)); + EXPECT_DEATH(MEMSET((char*)(array + length) - 1, element, 6), + RightOOBWriteMessage(0)); + EXPECT_DEATH(MEMSET(array + 1, element, size + sizeof(T)), + RightOOBWriteMessage(0)); // whole interval is to the right - EXPECT_DEATH(memset(array + length + 1, 0, 10), - RightOOBErrorMessage(sizeof(T))); + EXPECT_DEATH(MEMSET(array + length + 1, 0, 10), + RightOOBWriteMessage(sizeof(T))); // try to memset bytes to the left of array - EXPECT_DEATH(memset((char*)array - 1, element, size), - LeftOOBErrorMessage(1)); - EXPECT_DEATH(memset((char*)array - 5, 0, 6), - LeftOOBErrorMessage(5)); - EXPECT_DEATH(memset(array - 5, element, size + 5 * sizeof(T)), - LeftOOBErrorMessage(5 * sizeof(T))); + EXPECT_DEATH(MEMSET((char*)array - 1, element, size), + LeftOOBWriteMessage(1)); + EXPECT_DEATH(MEMSET((char*)array - 5, 0, 6), + LeftOOBWriteMessage(5)); + if (length >= 100) { + // Large OOB, we find it only if the redzone is large enough. + EXPECT_DEATH(memset(array - 5, element, size + 5 * sizeof(T)), + LeftOOBWriteMessage(5 * sizeof(T))); + } // whole interval is to the left - EXPECT_DEATH(memset(array - 2, 0, sizeof(T)), - LeftOOBErrorMessage(2 * sizeof(T))); + EXPECT_DEATH(MEMSET(array - 2, 0, sizeof(T)), + LeftOOBWriteMessage(2 * sizeof(T))); // try to memset bytes both to the left & to the right - EXPECT_DEATH(memset((char*)array - 2, element, size + 4), - LeftOOBErrorMessage(2)); + EXPECT_DEATH(MEMSET((char*)array - 2, element, size + 4), + LeftOOBWriteMessage(2)); free(array); } @@ -854,6 +922,51 @@ TEST(AddressSanitizer, MemSetOOBTest) { // We can test arrays of structres/classes here, but what for? } +// Try to allocate two arrays of 'size' bytes that are near each other. +// Strictly speaking we are not guaranteed to find such two pointers, +// but given the structure of asan's allocator we will. +static bool AllocateTwoAdjacentArrays(char **x1, char **x2, size_t size) { + vector<char *> v; + bool res = false; + for (size_t i = 0; i < 1000U && !res; i++) { + v.push_back(new char[size]); + if (i == 0) continue; + sort(v.begin(), v.end()); + for (size_t j = 1; j < v.size(); j++) { + assert(v[j] > v[j-1]); + if ((size_t)(v[j] - v[j-1]) < size * 2) { + *x2 = v[j]; + *x1 = v[j-1]; + res = true; + break; + } + } + } + + for (size_t i = 0; i < v.size(); i++) { + if (res && v[i] == *x1) continue; + if (res && v[i] == *x2) continue; + delete [] v[i]; + } + return res; +} + +TEST(AddressSanitizer, LargeOOBInMemset) { + for (size_t size = 200; size < 100000; size += size / 2) { + char *x1, *x2; + if (!Ident(AllocateTwoAdjacentArrays)(&x1, &x2, size)) + continue; + // fprintf(stderr, " large oob memset: %p %p %zd\n", x1, x2, size); + // Do a memset on x1 with huge out-of-bound access that will end up in x2. + EXPECT_DEATH(Ident(memset)(x1, 0, size * 2), + "is located 0 bytes to the right"); + delete [] x1; + delete [] x2; + return; + } + assert(0 && "Did not find two adjacent malloc-ed pointers"); +} + // Same test for memcpy and memmove functions template <typename T, class M> void MemTransferOOBTestTemplate(size_t length) { @@ -877,27 +990,27 @@ void MemTransferOOBTestTemplate(size_t length) { // try to change mem to the right of dest EXPECT_DEATH(M::transfer(dest + 1, src, size), - RightOOBErrorMessage(sizeof(T) - 1)); + RightOOBWriteMessage(0)); EXPECT_DEATH(M::transfer((char*)(dest + length) - 1, src, 5), - RightOOBErrorMessage(3)); + RightOOBWriteMessage(0)); // try to change mem to the left of dest EXPECT_DEATH(M::transfer(dest - 2, src, size), - LeftOOBErrorMessage(2 * sizeof(T))); + LeftOOBWriteMessage(2 * sizeof(T))); EXPECT_DEATH(M::transfer((char*)dest - 3, src, 4), - LeftOOBErrorMessage(3)); + LeftOOBWriteMessage(3)); // try to access mem to the right of src EXPECT_DEATH(M::transfer(dest, src + 2, size), - RightOOBErrorMessage(2 * sizeof(T) - 1)); + RightOOBReadMessage(0)); EXPECT_DEATH(M::transfer(dest, (char*)(src + length) - 3, 6), - RightOOBErrorMessage(2)); + RightOOBReadMessage(0)); // try to access mem to the left of src EXPECT_DEATH(M::transfer(dest, src - 1, size), - LeftOOBErrorMessage(sizeof(T))); + LeftOOBReadMessage(sizeof(T))); EXPECT_DEATH(M::transfer(dest, (char*)src - 6, 7), - LeftOOBErrorMessage(6)); + LeftOOBReadMessage(6)); // Generally we don't need to test cases where both accessing src and writing // to dest address to poisoned memory. @@ -906,10 +1019,10 @@ void MemTransferOOBTestTemplate(size_t length) { T *big_dest = Ident((T*)malloc(size * 2)); // try to change mem to both sides of dest EXPECT_DEATH(M::transfer(dest - 1, big_src, size * 2), - LeftOOBErrorMessage(sizeof(T))); + LeftOOBWriteMessage(sizeof(T))); // try to access mem to both sides of src EXPECT_DEATH(M::transfer(big_dest, src - 2, size * 2), - LeftOOBErrorMessage(2 * sizeof(T))); + LeftOOBReadMessage(2 * sizeof(T))); free(src); free(dest); @@ -920,7 +1033,7 @@ void MemTransferOOBTestTemplate(size_t length) { class MemCpyWrapper { public: static void* transfer(void *to, const void *from, size_t size) { - return memcpy(to, from, size); + return Ident(memcpy)(to, from, size); } }; TEST(AddressSanitizer, MemCpyOOBTest) { @@ -931,7 +1044,7 @@ TEST(AddressSanitizer, MemCpyOOBTest) { class MemMoveWrapper { public: static void* transfer(void *to, const void *from, size_t size) { - return memmove(to, from, size); + return Ident(memmove)(to, from, size); } }; TEST(AddressSanitizer, MemMoveOOBTest) { @@ -958,15 +1071,15 @@ void StrLenOOBTestTemplate(char *str, size_t length, bool is_global) { // Arg of strlen is not malloced, OOB access if (!is_global) { // We don't insert RedZones to the left of global variables - EXPECT_DEATH(Ident(strlen(str - 1)), LeftOOBErrorMessage(1)); - EXPECT_DEATH(Ident(strlen(str - 5)), LeftOOBErrorMessage(5)); + EXPECT_DEATH(Ident(strlen(str - 1)), LeftOOBReadMessage(1)); + EXPECT_DEATH(Ident(strlen(str - 5)), LeftOOBReadMessage(5)); } - EXPECT_DEATH(Ident(strlen(str + length + 1)), RightOOBErrorMessage(0)); + EXPECT_DEATH(Ident(strlen(str + length + 1)), RightOOBReadMessage(0)); // Overwrite terminator str[length] = 'a'; // String is not zero-terminated, strlen will lead to OOB access - EXPECT_DEATH(Ident(strlen(str)), RightOOBErrorMessage(0)); - EXPECT_DEATH(Ident(strlen(str + length)), RightOOBErrorMessage(0)); + EXPECT_DEATH(Ident(strlen(str)), RightOOBReadMessage(0)); + EXPECT_DEATH(Ident(strlen(str + length)), RightOOBReadMessage(0)); // Restore terminator str[length] = 0; } @@ -1010,11 +1123,11 @@ TEST(AddressSanitizer, StrNLenOOBTest) { str[size - 1] = '\0'; Ident(strnlen(str, 2 * size)); // Argument points to not allocated memory. - EXPECT_DEATH(Ident(strnlen(str - 1, 1)), LeftOOBErrorMessage(1)); - EXPECT_DEATH(Ident(strnlen(str + size, 1)), RightOOBErrorMessage(0)); + EXPECT_DEATH(Ident(strnlen(str - 1, 1)), LeftOOBReadMessage(1)); + EXPECT_DEATH(Ident(strnlen(str + size, 1)), RightOOBReadMessage(0)); // Overwrite the terminating '\0' and hit unallocated memory. str[size - 1] = 'z'; - EXPECT_DEATH(Ident(strnlen(str, size + 1)), RightOOBErrorMessage(0)); + EXPECT_DEATH(Ident(strnlen(str, size + 1)), RightOOBReadMessage(0)); free(str); } #endif @@ -1030,11 +1143,11 @@ TEST(AddressSanitizer, StrDupOOBTest) { new_str = strdup(str + size - 1); free(new_str); // Argument points to not allocated memory. - EXPECT_DEATH(Ident(strdup(str - 1)), LeftOOBErrorMessage(1)); - EXPECT_DEATH(Ident(strdup(str + size)), RightOOBErrorMessage(0)); + EXPECT_DEATH(Ident(strdup(str - 1)), LeftOOBReadMessage(1)); + EXPECT_DEATH(Ident(strdup(str + size)), RightOOBReadMessage(0)); // Overwrite the terminating '\0' and hit unallocated memory. str[size - 1] = 'z'; - EXPECT_DEATH(Ident(strdup(str)), RightOOBErrorMessage(0)); + EXPECT_DEATH(Ident(strdup(str)), RightOOBReadMessage(0)); free(str); } @@ -1048,15 +1161,15 @@ TEST(AddressSanitizer, StrCpyOOBTest) { strcpy(to, from); strcpy(to + to_size - from_size, from); // Length of "from" is too small. - EXPECT_DEATH(Ident(strcpy(from, "hello2")), RightOOBErrorMessage(0)); + EXPECT_DEATH(Ident(strcpy(from, "hello2")), RightOOBWriteMessage(0)); // "to" or "from" points to not allocated memory. - EXPECT_DEATH(Ident(strcpy(to - 1, from)), LeftOOBErrorMessage(1)); - EXPECT_DEATH(Ident(strcpy(to, from - 1)), LeftOOBErrorMessage(1)); - EXPECT_DEATH(Ident(strcpy(to, from + from_size)), RightOOBErrorMessage(0)); - EXPECT_DEATH(Ident(strcpy(to + to_size, from)), RightOOBErrorMessage(0)); + EXPECT_DEATH(Ident(strcpy(to - 1, from)), LeftOOBWriteMessage(1)); + EXPECT_DEATH(Ident(strcpy(to, from - 1)), LeftOOBReadMessage(1)); + EXPECT_DEATH(Ident(strcpy(to, from + from_size)), RightOOBReadMessage(0)); + EXPECT_DEATH(Ident(strcpy(to + to_size, from)), RightOOBWriteMessage(0)); // Overwrite the terminating '\0' character and hit unallocated memory. from[from_size - 1] = '!'; - EXPECT_DEATH(Ident(strcpy(to, from)), RightOOBErrorMessage(0)); + EXPECT_DEATH(Ident(strcpy(to, from)), RightOOBReadMessage(0)); free(to); free(from); } @@ -1078,25 +1191,25 @@ TEST(AddressSanitizer, StrNCpyOOBTest) { strncpy(to + to_size - 1, from, 1); // One of {to, from} points to not allocated memory EXPECT_DEATH(Ident(strncpy(to, from - 1, from_size)), - LeftOOBErrorMessage(1)); + LeftOOBReadMessage(1)); EXPECT_DEATH(Ident(strncpy(to - 1, from, from_size)), - LeftOOBErrorMessage(1)); + LeftOOBWriteMessage(1)); EXPECT_DEATH(Ident(strncpy(to, from + from_size, 1)), - RightOOBErrorMessage(0)); + RightOOBReadMessage(0)); EXPECT_DEATH(Ident(strncpy(to + to_size, from, 1)), - RightOOBErrorMessage(0)); + RightOOBWriteMessage(0)); // Length of "to" is too small EXPECT_DEATH(Ident(strncpy(to + to_size - from_size + 1, from, from_size)), - RightOOBErrorMessage(0)); + RightOOBWriteMessage(0)); EXPECT_DEATH(Ident(strncpy(to + 1, from, to_size)), - RightOOBErrorMessage(0)); + RightOOBWriteMessage(0)); // Overwrite terminator in from from[from_size - 1] = '!'; // normal strncpy call strncpy(to, from, from_size); // Length of "from" is too small EXPECT_DEATH(Ident(strncpy(to, from, to_size)), - RightOOBErrorMessage(0)); + RightOOBReadMessage(0)); free(to); free(from); } @@ -1117,11 +1230,11 @@ USED static void RunStrChrTest(PointerToStrChr1 StrChr) { EXPECT_EQ(str + 10, StrChr(str, 'q')); EXPECT_EQ(NULL, StrChr(str, 'a')); // StrChr argument points to not allocated memory. - EXPECT_DEATH(Ident(StrChr(str - 1, 'z')), LeftOOBErrorMessage(1)); - EXPECT_DEATH(Ident(StrChr(str + size, 'z')), RightOOBErrorMessage(0)); + EXPECT_DEATH(Ident(StrChr(str - 1, 'z')), LeftOOBReadMessage(1)); + EXPECT_DEATH(Ident(StrChr(str + size, 'z')), RightOOBReadMessage(0)); // Overwrite the terminator and hit not allocated memory. str[11] = 'z'; - EXPECT_DEATH(Ident(StrChr(str, 'a')), RightOOBErrorMessage(0)); + EXPECT_DEATH(Ident(StrChr(str, 'a')), RightOOBReadMessage(0)); free(str); } USED static void RunStrChrTest(PointerToStrChr2 StrChr) { @@ -1133,11 +1246,11 @@ USED static void RunStrChrTest(PointerToStrChr2 StrChr) { EXPECT_EQ(str + 10, StrChr(str, 'q')); EXPECT_EQ(NULL, StrChr(str, 'a')); // StrChr argument points to not allocated memory. - EXPECT_DEATH(Ident(StrChr(str - 1, 'z')), LeftOOBErrorMessage(1)); - EXPECT_DEATH(Ident(StrChr(str + size, 'z')), RightOOBErrorMessage(0)); + EXPECT_DEATH(Ident(StrChr(str - 1, 'z')), LeftOOBReadMessage(1)); + EXPECT_DEATH(Ident(StrChr(str + size, 'z')), RightOOBReadMessage(0)); // Overwrite the terminator and hit not allocated memory. str[11] = 'z'; - EXPECT_DEATH(Ident(StrChr(str, 'a')), RightOOBErrorMessage(0)); + EXPECT_DEATH(Ident(StrChr(str, 'a')), RightOOBReadMessage(0)); free(str); } @@ -1198,8 +1311,9 @@ TEST(AddressSanitizer, StrCmpAndFriendsLogicTest) { typedef int(*PointerToStrCmp)(const char*, const char*); void RunStrCmpTest(PointerToStrCmp StrCmp) { size_t size = Ident(100); - char *s1 = MallocAndMemsetString(size); - char *s2 = MallocAndMemsetString(size); + int fill = 'o'; + char *s1 = MallocAndMemsetString(size, fill); + char *s2 = MallocAndMemsetString(size, fill); s1[size - 1] = '\0'; s2[size - 1] = '\0'; // Normal StrCmp calls @@ -1210,14 +1324,14 @@ void RunStrCmpTest(PointerToStrCmp StrCmp) { s2[size - 1] = 'x'; Ident(StrCmp(s1, s2)); // One of arguments points to not allocated memory. - EXPECT_DEATH(Ident(StrCmp)(s1 - 1, s2), LeftOOBErrorMessage(1)); - EXPECT_DEATH(Ident(StrCmp)(s1, s2 - 1), LeftOOBErrorMessage(1)); - EXPECT_DEATH(Ident(StrCmp)(s1 + size, s2), RightOOBErrorMessage(0)); - EXPECT_DEATH(Ident(StrCmp)(s1, s2 + size), RightOOBErrorMessage(0)); + EXPECT_DEATH(Ident(StrCmp)(s1 - 1, s2), LeftOOBReadMessage(1)); + EXPECT_DEATH(Ident(StrCmp)(s1, s2 - 1), LeftOOBReadMessage(1)); + EXPECT_DEATH(Ident(StrCmp)(s1 + size, s2), RightOOBReadMessage(0)); + EXPECT_DEATH(Ident(StrCmp)(s1, s2 + size), RightOOBReadMessage(0)); // Hit unallocated memory and die. - s2[size - 1] = 'z'; - EXPECT_DEATH(Ident(StrCmp)(s1, s1), RightOOBErrorMessage(0)); - EXPECT_DEATH(Ident(StrCmp)(s1 + size - 1, s2), RightOOBErrorMessage(0)); + s1[size - 1] = fill; + EXPECT_DEATH(Ident(StrCmp)(s1, s1), RightOOBReadMessage(0)); + EXPECT_DEATH(Ident(StrCmp)(s1 + size - 1, s2), RightOOBReadMessage(0)); free(s1); free(s2); } @@ -1246,13 +1360,13 @@ void RunStrNCmpTest(PointerToStrNCmp StrNCmp) { Ident(StrNCmp(s1 - 1, s2 - 1, 0)); Ident(StrNCmp(s1 + size - 1, s2 + size - 1, 1)); // One of arguments points to not allocated memory. - EXPECT_DEATH(Ident(StrNCmp)(s1 - 1, s2, 1), LeftOOBErrorMessage(1)); - EXPECT_DEATH(Ident(StrNCmp)(s1, s2 - 1, 1), LeftOOBErrorMessage(1)); - EXPECT_DEATH(Ident(StrNCmp)(s1 + size, s2, 1), RightOOBErrorMessage(0)); - EXPECT_DEATH(Ident(StrNCmp)(s1, s2 + size, 1), RightOOBErrorMessage(0)); + EXPECT_DEATH(Ident(StrNCmp)(s1 - 1, s2, 1), LeftOOBReadMessage(1)); + EXPECT_DEATH(Ident(StrNCmp)(s1, s2 - 1, 1), LeftOOBReadMessage(1)); + EXPECT_DEATH(Ident(StrNCmp)(s1 + size, s2, 1), RightOOBReadMessage(0)); + EXPECT_DEATH(Ident(StrNCmp)(s1, s2 + size, 1), RightOOBReadMessage(0)); // Hit unallocated memory and die. - EXPECT_DEATH(Ident(StrNCmp)(s1 + 1, s2 + 1, size), RightOOBErrorMessage(0)); - EXPECT_DEATH(Ident(StrNCmp)(s1 + size - 1, s2, 2), RightOOBErrorMessage(0)); + EXPECT_DEATH(Ident(StrNCmp)(s1 + 1, s2 + 1, size), RightOOBReadMessage(0)); + EXPECT_DEATH(Ident(StrNCmp)(s1 + size - 1, s2, 2), RightOOBReadMessage(0)); free(s1); free(s2); } @@ -1274,22 +1388,23 @@ TEST(AddressSanitizer, MemCmpOOBTest) { Ident(memcmp(s1 + size - 1, s2 + size - 1, 1)); Ident(memcmp(s1 - 1, s2 - 1, 0)); // One of arguments points to not allocated memory. - EXPECT_DEATH(Ident(memcmp)(s1 - 1, s2, 1), LeftOOBErrorMessage(1)); - EXPECT_DEATH(Ident(memcmp)(s1, s2 - 1, 1), LeftOOBErrorMessage(1)); - EXPECT_DEATH(Ident(memcmp)(s1 + size, s2, 1), RightOOBErrorMessage(0)); - EXPECT_DEATH(Ident(memcmp)(s1, s2 + size, 1), RightOOBErrorMessage(0)); + EXPECT_DEATH(Ident(memcmp)(s1 - 1, s2, 1), LeftOOBReadMessage(1)); + EXPECT_DEATH(Ident(memcmp)(s1, s2 - 1, 1), LeftOOBReadMessage(1)); + EXPECT_DEATH(Ident(memcmp)(s1 + size, s2, 1), RightOOBReadMessage(0)); + EXPECT_DEATH(Ident(memcmp)(s1, s2 + size, 1), RightOOBReadMessage(0)); // Hit unallocated memory and die. - EXPECT_DEATH(Ident(memcmp)(s1 + 1, s2 + 1, size), RightOOBErrorMessage(0)); - EXPECT_DEATH(Ident(memcmp)(s1 + size - 1, s2, 2), RightOOBErrorMessage(0)); + EXPECT_DEATH(Ident(memcmp)(s1 + 1, s2 + 1, size), RightOOBReadMessage(0)); + EXPECT_DEATH(Ident(memcmp)(s1 + size - 1, s2, 2), RightOOBReadMessage(0)); // Zero bytes are not terminators and don't prevent from OOB. s1[size - 1] = '\0'; s2[size - 1] = '\0'; - EXPECT_DEATH(Ident(memcmp)(s1, s2, size + 1), RightOOBErrorMessage(0)); + EXPECT_DEATH(Ident(memcmp)(s1, s2, size + 1), RightOOBReadMessage(0)); free(s1); free(s2); } TEST(AddressSanitizer, StrCatOOBTest) { + // strcat() reads strlen(to) bytes from |to| before concatenating. size_t to_size = Ident(100); char *to = MallocAndMemsetString(to_size); to[0] = '\0'; @@ -1302,23 +1417,23 @@ TEST(AddressSanitizer, StrCatOOBTest) { strcat(to + from_size, from + from_size - 2); // Passing an invalid pointer is an error even when concatenating an empty // string. - EXPECT_DEATH(strcat(to - 1, from + from_size - 1), LeftOOBErrorMessage(1)); + EXPECT_DEATH(strcat(to - 1, from + from_size - 1), LeftOOBAccessMessage(1)); // One of arguments points to not allocated memory. - EXPECT_DEATH(strcat(to - 1, from), LeftOOBErrorMessage(1)); - EXPECT_DEATH(strcat(to, from - 1), LeftOOBErrorMessage(1)); - EXPECT_DEATH(strcat(to + to_size, from), RightOOBErrorMessage(0)); - EXPECT_DEATH(strcat(to, from + from_size), RightOOBErrorMessage(0)); + EXPECT_DEATH(strcat(to - 1, from), LeftOOBAccessMessage(1)); + EXPECT_DEATH(strcat(to, from - 1), LeftOOBReadMessage(1)); + EXPECT_DEATH(strcat(to + to_size, from), RightOOBWriteMessage(0)); + EXPECT_DEATH(strcat(to, from + from_size), RightOOBReadMessage(0)); // "from" is not zero-terminated. from[from_size - 1] = 'z'; - EXPECT_DEATH(strcat(to, from), RightOOBErrorMessage(0)); + EXPECT_DEATH(strcat(to, from), RightOOBReadMessage(0)); from[from_size - 1] = '\0'; // "to" is not zero-terminated. memset(to, 'z', to_size); - EXPECT_DEATH(strcat(to, from), RightOOBErrorMessage(0)); + EXPECT_DEATH(strcat(to, from), RightOOBWriteMessage(0)); // "to" is too short to fit "from". to[to_size - from_size + 1] = '\0'; - EXPECT_DEATH(strcat(to, from), RightOOBErrorMessage(0)); + EXPECT_DEATH(strcat(to, from), RightOOBWriteMessage(0)); // length of "to" is just enough. strcat(to, from + 1); @@ -1327,6 +1442,7 @@ TEST(AddressSanitizer, StrCatOOBTest) { } TEST(AddressSanitizer, StrNCatOOBTest) { + // strncat() reads strlen(to) bytes from |to| before concatenating. size_t to_size = Ident(100); char *to = MallocAndMemsetString(to_size); to[0] = '\0'; @@ -1338,25 +1454,25 @@ TEST(AddressSanitizer, StrNCatOOBTest) { from[from_size - 1] = '\0'; strncat(to, from, 2 * from_size); // Catenating empty string with an invalid string is still an error. - EXPECT_DEATH(strncat(to - 1, from, 0), LeftOOBErrorMessage(1)); + EXPECT_DEATH(strncat(to - 1, from, 0), LeftOOBAccessMessage(1)); strncat(to, from + from_size - 1, 10); // One of arguments points to not allocated memory. - EXPECT_DEATH(strncat(to - 1, from, 2), LeftOOBErrorMessage(1)); - EXPECT_DEATH(strncat(to, from - 1, 2), LeftOOBErrorMessage(1)); - EXPECT_DEATH(strncat(to + to_size, from, 2), RightOOBErrorMessage(0)); - EXPECT_DEATH(strncat(to, from + from_size, 2), RightOOBErrorMessage(0)); + EXPECT_DEATH(strncat(to - 1, from, 2), LeftOOBAccessMessage(1)); + EXPECT_DEATH(strncat(to, from - 1, 2), LeftOOBReadMessage(1)); + EXPECT_DEATH(strncat(to + to_size, from, 2), RightOOBWriteMessage(0)); + EXPECT_DEATH(strncat(to, from + from_size, 2), RightOOBReadMessage(0)); memset(from, 'z', from_size); memset(to, 'z', to_size); to[0] = '\0'; // "from" is too short. - EXPECT_DEATH(strncat(to, from, from_size + 1), RightOOBErrorMessage(0)); + EXPECT_DEATH(strncat(to, from, from_size + 1), RightOOBReadMessage(0)); // "to" is not zero-terminated. - EXPECT_DEATH(strncat(to + 1, from, 1), RightOOBErrorMessage(0)); + EXPECT_DEATH(strncat(to + 1, from, 1), RightOOBWriteMessage(0)); // "to" is too short to fit "from". to[0] = 'z'; to[to_size - from_size + 1] = '\0'; - EXPECT_DEATH(strncat(to, from, from_size - 1), RightOOBErrorMessage(0)); + EXPECT_DEATH(strncat(to, from, from_size - 1), RightOOBWriteMessage(0)); // "to" is just enough. strncat(to, from, from_size - 2); @@ -1447,10 +1563,10 @@ typedef void(*PointerToCallAtoi)(const char*); void RunAtoiOOBTest(PointerToCallAtoi Atoi) { char *array = MallocAndMemsetString(10, '1'); // Invalid pointer to the string. - EXPECT_DEATH(Atoi(array + 11), RightOOBErrorMessage(1)); - EXPECT_DEATH(Atoi(array - 1), LeftOOBErrorMessage(1)); + EXPECT_DEATH(Atoi(array + 11), RightOOBReadMessage(1)); + EXPECT_DEATH(Atoi(array - 1), LeftOOBReadMessage(1)); // Die if a buffer doesn't have terminating NULL. - EXPECT_DEATH(Atoi(array), RightOOBErrorMessage(0)); + EXPECT_DEATH(Atoi(array), RightOOBReadMessage(0)); // Make last symbol a terminating NULL or other non-digit. array[9] = '\0'; Atoi(array); @@ -1459,13 +1575,13 @@ void RunAtoiOOBTest(PointerToCallAtoi Atoi) { Atoi(array + 9); // Sometimes we need to detect overflow if no digits are found. memset(array, ' ', 10); - EXPECT_DEATH(Atoi(array), RightOOBErrorMessage(0)); + EXPECT_DEATH(Atoi(array), RightOOBReadMessage(0)); array[9] = '-'; - EXPECT_DEATH(Atoi(array), RightOOBErrorMessage(0)); - EXPECT_DEATH(Atoi(array + 9), RightOOBErrorMessage(0)); + EXPECT_DEATH(Atoi(array), RightOOBReadMessage(0)); + EXPECT_DEATH(Atoi(array + 9), RightOOBReadMessage(0)); array[8] = '-'; Atoi(array); - delete array; + free(array); } TEST(AddressSanitizer, AtoiAndFriendsOOBTest) { @@ -1489,16 +1605,16 @@ void RunStrtolOOBTest(PointerToCallStrtol Strtol) { array[1] = '2'; array[2] = '3'; // Invalid pointer to the string. - EXPECT_DEATH(Strtol(array + 3, NULL, 0), RightOOBErrorMessage(0)); - EXPECT_DEATH(Strtol(array - 1, NULL, 0), LeftOOBErrorMessage(1)); + EXPECT_DEATH(Strtol(array + 3, NULL, 0), RightOOBReadMessage(0)); + EXPECT_DEATH(Strtol(array - 1, NULL, 0), LeftOOBReadMessage(1)); // Buffer overflow if there is no terminating null (depends on base). Strtol(array, &endptr, 3); EXPECT_EQ(array + 2, endptr); - EXPECT_DEATH(Strtol(array, NULL, 0), RightOOBErrorMessage(0)); + EXPECT_DEATH(Strtol(array, NULL, 0), RightOOBReadMessage(0)); array[2] = 'z'; Strtol(array, &endptr, 35); EXPECT_EQ(array + 2, endptr); - EXPECT_DEATH(Strtol(array, NULL, 36), RightOOBErrorMessage(0)); + EXPECT_DEATH(Strtol(array, NULL, 36), RightOOBReadMessage(0)); // Add terminating zero to get rid of overflow. array[2] = '\0'; Strtol(array, NULL, 36); @@ -1507,11 +1623,11 @@ void RunStrtolOOBTest(PointerToCallStrtol Strtol) { Strtol(array + 3, NULL, 1); // Sometimes we need to detect overflow if no digits are found. array[0] = array[1] = array[2] = ' '; - EXPECT_DEATH(Strtol(array, NULL, 0), RightOOBErrorMessage(0)); + EXPECT_DEATH(Strtol(array, NULL, 0), RightOOBReadMessage(0)); array[2] = '+'; - EXPECT_DEATH(Strtol(array, NULL, 0), RightOOBErrorMessage(0)); + EXPECT_DEATH(Strtol(array, NULL, 0), RightOOBReadMessage(0)); array[2] = '-'; - EXPECT_DEATH(Strtol(array, NULL, 0), RightOOBErrorMessage(0)); + EXPECT_DEATH(Strtol(array, NULL, 0), RightOOBReadMessage(0)); array[1] = '+'; Strtol(array, NULL, 0); array[1] = array[2] = 'z'; @@ -1519,7 +1635,7 @@ void RunStrtolOOBTest(PointerToCallStrtol Strtol) { EXPECT_EQ(array, endptr); Strtol(array + 2, NULL, 0); EXPECT_EQ(array, endptr); - delete array; + free(array); } TEST(AddressSanitizer, StrtollOOBTest) { @@ -1538,7 +1654,7 @@ typedef void*(*PointerToMemSet)(void*, int, size_t); void CallMemSetByPointer(PointerToMemSet MemSet) { size_t size = Ident(100); char *array = Ident((char*)malloc(size)); - EXPECT_DEATH(MemSet(array, 0, 101), RightOOBErrorMessage(0)); + EXPECT_DEATH(MemSet(array, 0, 101), RightOOBWriteMessage(0)); free(array); } @@ -1546,7 +1662,7 @@ void CallMemTransferByPointer(PointerToMemTransfer MemTransfer) { size_t size = Ident(100); char *src = Ident((char*)malloc(size)); char *dst = Ident((char*)malloc(size)); - EXPECT_DEATH(MemTransfer(dst, src, 101), RightOOBErrorMessage(0)); + EXPECT_DEATH(MemTransfer(dst, src, 101), RightOOBWriteMessage(0)); free(src); free(dst); } @@ -1557,12 +1673,51 @@ TEST(AddressSanitizer, DISABLED_MemIntrinsicCallByPointerTest) { CallMemTransferByPointer(&memmove); } +#if defined(__linux__) && !defined(ANDROID) && !defined(__ANDROID__) +TEST(AddressSanitizer, pread) { + char *x = new char[10]; + int fd = open("/proc/self/stat", O_RDONLY); + ASSERT_GT(fd, 0); + EXPECT_DEATH(pread(fd, x, 15, 0), + ASAN_PCRE_DOTALL + "AddressSanitizer: heap-buffer-overflow" + ".* is located 0 bytes to the right of 10-byte region"); + close(fd); + delete [] x; +} + +TEST(AddressSanitizer, pread64) { + char *x = new char[10]; + int fd = open("/proc/self/stat", O_RDONLY); + ASSERT_GT(fd, 0); + EXPECT_DEATH(pread64(fd, x, 15, 0), + ASAN_PCRE_DOTALL + "AddressSanitizer: heap-buffer-overflow" + ".* is located 0 bytes to the right of 10-byte region"); + close(fd); + delete [] x; +} + +TEST(AddressSanitizer, read) { + char *x = new char[10]; + int fd = open("/proc/self/stat", O_RDONLY); + ASSERT_GT(fd, 0); + EXPECT_DEATH(read(fd, x, 15), + ASAN_PCRE_DOTALL + "AddressSanitizer: heap-buffer-overflow" + ".* is located 0 bytes to the right of 10-byte region"); + close(fd); + delete [] x; +} + +#endif // defined(__linux__) && !defined(ANDROID) && !defined(__ANDROID__) + // This test case fails // Clang optimizes memcpy/memset calls which lead to unaligned access TEST(AddressSanitizer, DISABLED_MemIntrinsicUnalignedAccessTest) { int size = Ident(4096); char *s = Ident((char*)malloc(size)); - EXPECT_DEATH(memset(s + size - 1, 0, 2), RightOOBErrorMessage(0)); + EXPECT_DEATH(memset(s + size - 1, 0, 2), RightOOBWriteMessage(0)); free(s); } @@ -1617,19 +1772,30 @@ TEST(AddressSanitizer, DISABLED_MallocFreeUnwindAndSymbolizeTest) { "malloc_fff.*malloc_eee.*malloc_ddd"); } +static bool TryToSetThreadName(const char *name) { +#if defined(__linux__) && defined(PR_SET_NAME) + return 0 == prctl(PR_SET_NAME, (unsigned long)name, 0, 0, 0); +#else + return false; +#endif +} + void *ThreadedTestAlloc(void *a) { + EXPECT_EQ(true, TryToSetThreadName("AllocThr")); int **p = (int**)a; *p = new int; return 0; } void *ThreadedTestFree(void *a) { + EXPECT_EQ(true, TryToSetThreadName("FreeThr")); int **p = (int**)a; delete *p; return 0; } void *ThreadedTestUse(void *a) { + EXPECT_EQ(true, TryToSetThreadName("UseThr")); int **p = (int**)a; **p = 1; return 0; @@ -1654,6 +1820,30 @@ TEST(AddressSanitizer, ThreadedTest) { ".*Thread T.*created"); } +void *ThreadedTestFunc(void *unused) { + // Check if prctl(PR_SET_NAME) is supported. Return if not. + if (!TryToSetThreadName("TestFunc")) + return 0; + EXPECT_DEATH(ThreadedTestSpawn(), + ASAN_PCRE_DOTALL + "WRITE .*thread T. .UseThr." + ".*freed by thread T. .FreeThr. here:" + ".*previously allocated by thread T. .AllocThr. here:" + ".*Thread T. .UseThr. created by T.*TestFunc" + ".*Thread T. .FreeThr. created by T" + ".*Thread T. .AllocThr. created by T" + ""); + return 0; +} + +TEST(AddressSanitizer, ThreadNamesTest) { + // Run ThreadedTestFunc in a separate thread because it tries to set a + // thread name and we don't want to change the main thread's name. + pthread_t t; + PTHREAD_CREATE(&t, 0, ThreadedTestFunc, 0); + PTHREAD_JOIN(t, 0); +} + #if ASAN_NEEDS_SEGV TEST(AddressSanitizer, ShadowGapTest) { #if SANITIZER_WORDSIZE == 32 @@ -1868,6 +2058,27 @@ TEST(AddressSanitizer, AttributeNoAddressSafetyTest) { Ident(NoAddressSafety)(); } +static string MismatchStr(const string &str) { + return string("AddressSanitizer: alloc-dealloc-mismatch \\(") + str; +} + +// This test is disabled until we enable alloc_dealloc_mismatch by default. +// The feature is also tested by lit tests. +TEST(AddressSanitizer, DISABLED_AllocDeallocMismatch) { + EXPECT_DEATH(free(Ident(new int)), + MismatchStr("operator new vs free")); + EXPECT_DEATH(free(Ident(new int[2])), + MismatchStr("operator new \\[\\] vs free")); + EXPECT_DEATH(delete (Ident(new int[2])), + MismatchStr("operator new \\[\\] vs operator delete")); + EXPECT_DEATH(delete (Ident((int*)malloc(2 * sizeof(int)))), + MismatchStr("malloc vs operator delete")); + EXPECT_DEATH(delete [] (Ident(new int)), + MismatchStr("operator new vs operator delete \\[\\]")); + EXPECT_DEATH(delete [] (Ident((int*)malloc(2 * sizeof(int)))), + MismatchStr("malloc vs operator delete \\[\\]")); +} + // ------------------ demo tests; run each one-by-one ------------- // e.g. --gtest_filter=*DemoOOBLeftHigh --gtest_also_run_disabled_tests TEST(AddressSanitizer, DISABLED_DemoThreadedTest) { @@ -2033,53 +2244,56 @@ TEST(AddressSanitizerMac, DISABLED_CFAllocatorMallocZoneDoubleFree) { EXPECT_DEATH(CFAllocatorMallocZoneDoubleFree(), "attempting double-free"); } +// For libdispatch tests below we check that ASan got to the shadow byte +// legend, i.e. managed to print the thread stacks (this almost certainly +// means that the libdispatch task creation has been intercepted correctly). TEST(AddressSanitizerMac, GCDDispatchAsync) { // Make sure the whole ASan report is printed, i.e. that we don't die // on a CHECK. - EXPECT_DEATH(TestGCDDispatchAsync(), "Shadow byte and word"); + EXPECT_DEATH(TestGCDDispatchAsync(), "Shadow byte legend"); } TEST(AddressSanitizerMac, GCDDispatchSync) { // Make sure the whole ASan report is printed, i.e. that we don't die // on a CHECK. - EXPECT_DEATH(TestGCDDispatchSync(), "Shadow byte and word"); + EXPECT_DEATH(TestGCDDispatchSync(), "Shadow byte legend"); } TEST(AddressSanitizerMac, GCDReuseWqthreadsAsync) { // Make sure the whole ASan report is printed, i.e. that we don't die // on a CHECK. - EXPECT_DEATH(TestGCDReuseWqthreadsAsync(), "Shadow byte and word"); + EXPECT_DEATH(TestGCDReuseWqthreadsAsync(), "Shadow byte legend"); } TEST(AddressSanitizerMac, GCDReuseWqthreadsSync) { // Make sure the whole ASan report is printed, i.e. that we don't die // on a CHECK. - EXPECT_DEATH(TestGCDReuseWqthreadsSync(), "Shadow byte and word"); + EXPECT_DEATH(TestGCDReuseWqthreadsSync(), "Shadow byte legend"); } TEST(AddressSanitizerMac, GCDDispatchAfter) { // Make sure the whole ASan report is printed, i.e. that we don't die // on a CHECK. - EXPECT_DEATH(TestGCDDispatchAfter(), "Shadow byte and word"); + EXPECT_DEATH(TestGCDDispatchAfter(), "Shadow byte legend"); } TEST(AddressSanitizerMac, GCDSourceEvent) { // Make sure the whole ASan report is printed, i.e. that we don't die // on a CHECK. - EXPECT_DEATH(TestGCDSourceEvent(), "Shadow byte and word"); + EXPECT_DEATH(TestGCDSourceEvent(), "Shadow byte legend"); } TEST(AddressSanitizerMac, GCDSourceCancel) { // Make sure the whole ASan report is printed, i.e. that we don't die // on a CHECK. - EXPECT_DEATH(TestGCDSourceCancel(), "Shadow byte and word"); + EXPECT_DEATH(TestGCDSourceCancel(), "Shadow byte legend"); } TEST(AddressSanitizerMac, GCDGroupAsync) { // Make sure the whole ASan report is printed, i.e. that we don't die // on a CHECK. - EXPECT_DEATH(TestGCDGroupAsync(), "Shadow byte and word"); + EXPECT_DEATH(TestGCDGroupAsync(), "Shadow byte legend"); } void *MallocIntrospectionLockWorker(void *_) { @@ -2172,7 +2386,7 @@ TEST(AddressSanitizerMac, NSURLDeallocation) { TEST(AddressSanitizerMac, Mstats) { malloc_statistics_t stats1, stats2; malloc_zone_statistics(/*all zones*/NULL, &stats1); - const int kMallocSize = 100000; + const size_t kMallocSize = 100000; void *alloc = Ident(malloc(kMallocSize)); malloc_zone_statistics(/*all zones*/NULL, &stats2); EXPECT_GT(stats2.blocks_in_use, stats1.blocks_in_use); diff --git a/gcc/testsuite/g++.dg/bprob/bprob.exp b/gcc/testsuite/g++.dg/bprob/bprob.exp index 0ffbd0fa12e..8e6d13bbd8c 100644 --- a/gcc/testsuite/g++.dg/bprob/bprob.exp +++ b/gcc/testsuite/g++.dg/bprob/bprob.exp @@ -1,5 +1,4 @@ -# Copyright (C) 2001, 2002, 2004, 2007, 2008, 2011, 2012 -# Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/g++.dg/charset/charset.exp b/gcc/testsuite/g++.dg/charset/charset.exp index 533160f5a2a..bea92fb11dd 100644 --- a/gcc/testsuite/g++.dg/charset/charset.exp +++ b/gcc/testsuite/g++.dg/charset/charset.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2007, 2011 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/g++.dg/compat/break/README b/gcc/testsuite/g++.dg/compat/break/README index 0b8ea0247e9..9100c8fa0a3 100644 --- a/gcc/testsuite/g++.dg/compat/break/README +++ b/gcc/testsuite/g++.dg/compat/break/README @@ -11,7 +11,7 @@ ABI-compliant should also be covered by a test for -Wabi to ensure that there is a warning for the construct. -Copyright (C) 2002 Free Software Foundation, Inc. +Copyright (C) 2002-2013 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff --git a/gcc/testsuite/g++.dg/compat/compat.exp b/gcc/testsuite/g++.dg/compat/compat.exp index 7fb16fed959..d4e9f73217f 100644 --- a/gcc/testsuite/g++.dg/compat/compat.exp +++ b/gcc/testsuite/g++.dg/compat/compat.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2002, 2004, 2007 Free Software Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/g++.dg/compat/struct-layout-1.exp b/gcc/testsuite/g++.dg/compat/struct-layout-1.exp index 7fa89470e16..04232160fe2 100644 --- a/gcc/testsuite/g++.dg/compat/struct-layout-1.exp +++ b/gcc/testsuite/g++.dg/compat/struct-layout-1.exp @@ -1,5 +1,4 @@ -# Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor13.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor13.C new file mode 100644 index 00000000000..ed01a3112fc --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor13.C @@ -0,0 +1,15 @@ +// PR c++/55753 +// { dg-options -std=c++11 } + +struct A +{ + double r,i; + constexpr A(double r = 0.0, double i = 0.0): r(r), i(i) {} +}; + +template <typename Tp> +struct B { + B() { + A((true ? 1.0 : A())); + } +}; diff --git a/gcc/testsuite/g++.dg/debug/debug.exp b/gcc/testsuite/g++.dg/debug/debug.exp index e98d0fe554d..75d19a442ba 100644 --- a/gcc/testsuite/g++.dg/debug/debug.exp +++ b/gcc/testsuite/g++.dg/debug/debug.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2002, 2007 Free Software Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp b/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp index 09d52f088fb..027a5158e2e 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp +++ b/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2007, 2007, 2010, 2011 Free Software Foundation, Inc. +# Copyright (C) 2007-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pr54508.C b/gcc/testsuite/g++.dg/debug/dwarf2/pr54508.C index c1163c9f71d..4efc7ec5253 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/pr54508.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/pr54508.C @@ -2,17 +2,17 @@ // { dg-do compile } // { dg-options "-g2 -dA -fno-merge-debug-strings" } -// { dg-final { scan-assembler-not "\"cbase\\\\0\"\[ \t\]+\[#;/!|@\]+ DW_AT_name" } } -// { dg-final { scan-assembler "\"c\\\\0\"\[ \t\]+\[#;/!|@\]+ DW_AT_name\[\r\n\]+\[\^\r\n\]+\[\r\n\]+\[\^\r\n\]+\[\r\n\]+\[\^#;/!|@\]+\[#;/!|@\]+ DW_AT_decl_line\[\r\n\]+\[\^#;/!|@\]+\[#;/!|@\]+ DW_AT_declaration" } } -// { dg-final { scan-assembler-not "\"OPCODE\\\\0\"\[ \t\]+\[#;/!|@\]+ DW_AT_name" } } -// { dg-final { scan-assembler-not "\"bi\\\\0\"\[ \t\]+\[#;/!|@\]+ DW_AT_name" } } -// { dg-final { scan-assembler-not "\"si\\\\0\"\[ \t\]+\[#;/!|@\]+ DW_AT_name" } } -// { dg-final { scan-assembler "\"s\\\\0\"\[ \t\]+\[#;/!|@\]+ DW_AT_name" } } -// { dg-final { scan-assembler-not "\"s\\\\0\"\[^#;/!|@\]+\[#;/!|@\]+ DW_AT_name\[\r\n\]+\[\^\r\n\]+\[\r\n\]+\[\^\r\n\]+\[\r\n\]+\[\^#;/!|@\]+\[#;/!|@\]+ DW_AT_decl_line\[\r\n\]+\[ \t\]+\[#;/!|@\]+ DW_AT_declaration" } } -// { dg-final { scan-assembler "\"f1\\\\0\"\[ \t\]+\[#;/!|@\]+ DW_AT_name" } } -// { dg-final { scan-assembler "\"u\\\\0\"\[ \t\]+\[#;/!|@\]+ DW_AT_name\[\r\n\]+\[\^\r\n\]+\[\r\n\]+\[\^\r\n\]+\[\r\n\]+\[\^#;/!|@\]+\[#;/!|@\]+ DW_AT_decl_line\[\r\n\]+\[^#;/!|@\]+\[#;/!|@\]+ DW_AT_declaration" } } -// { dg-final { scan-assembler-not "\"f2\\\\0\"\[ \t\]+\[#;/!|@\]+ DW_AT_name" } } -// { dg-final { scan-assembler-not "\"nc\\\\0\"\[ \t\]+\# DW_AT_name" } } +// { dg-final { scan-assembler-not "\"cbase\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } } +// { dg-final { scan-assembler "\"c\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name\[\r\n\]+\[\^\r\n\]+\[\r\n\]+\[\^\r\n\]+\[\r\n\]+\[\^#;/!|@\]+\[#;/!|@\]+ +DW_AT_decl_line\[\r\n\]+\[\^#;/!|@\]+\[#;/!|@\]+ +DW_AT_declaration" } } +// { dg-final { scan-assembler-not "\"OPCODE\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } } +// { dg-final { scan-assembler-not "\"bi\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } } +// { dg-final { scan-assembler-not "\"si\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } } +// { dg-final { scan-assembler "\"s\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } } +// { dg-final { scan-assembler-not "\"s\\\\0\"\[^#;/!|@\]+\[#;/!|@\]+ +DW_AT_name\[\r\n\]+\[\^\r\n\]+\[\r\n\]+\[\^\r\n\]+\[\r\n\]+\[\^#;/!|@\]+\[#;/!|@\]+ +DW_AT_decl_line\[\r\n\]+\[ \t\]+\[#;/!|@\]+ +DW_AT_declaration" } } +// { dg-final { scan-assembler "\"f1\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } } +// { dg-final { scan-assembler "\"u\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name\[\r\n\]+\[\^\r\n\]+\[\r\n\]+\[\^\r\n\]+\[\r\n\]+\[\^#;/!|@\]+\[#;/!|@\]+ +DW_AT_decl_line\[\r\n\]+\[^#;/!|@\]+\[#;/!|@\]+ +DW_AT_declaration" } } +// { dg-final { scan-assembler-not "\"f2\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } } +// { dg-final { scan-assembler-not "\"nc\\\\0\"\[ \t\]+\# +DW_AT_name" } } class cbase diff --git a/gcc/testsuite/g++.dg/dfp/dfp.exp b/gcc/testsuite/g++.dg/dfp/dfp.exp index 0eb1c515095..3c60373fefc 100644 --- a/gcc/testsuite/g++.dg/dfp/dfp.exp +++ b/gcc/testsuite/g++.dg/dfp/dfp.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007, 2009, 2011 Free Software Foundation, Inc. +# Copyright (C) 2005-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/g++.dg/dg.exp b/gcc/testsuite/g++.dg/dg.exp index e0184c6024b..720135942bb 100644 --- a/gcc/testsuite/g++.dg/dg.exp +++ b/gcc/testsuite/g++.dg/dg.exp @@ -1,5 +1,4 @@ -# Copyright (C) 2000, 2007, 2009, 2010, 2011, 2012 -# Free Software Foundation, Inc. +# Copyright (C) 2000-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/g++.dg/gcov/gcov.exp b/gcc/testsuite/g++.dg/gcov/gcov.exp index 813be850e93..ec0dfcf3421 100644 --- a/gcc/testsuite/g++.dg/gcov/gcov.exp +++ b/gcc/testsuite/g++.dg/gcov/gcov.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2001, 2002, 2007, 2011 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/g++.dg/gomp/gomp.exp b/gcc/testsuite/g++.dg/gomp/gomp.exp index 3815a3590fd..d0199cb36f8 100644 --- a/gcc/testsuite/g++.dg/gomp/gomp.exp +++ b/gcc/testsuite/g++.dg/gomp/gomp.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2011 Free Software Foundation, Inc. +# Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file is part of GCC. # diff --git a/gcc/testsuite/g++.dg/graphite/graphite.exp b/gcc/testsuite/g++.dg/graphite/graphite.exp index 31636c6242e..75e91204ace 100644 --- a/gcc/testsuite/g++.dg/graphite/graphite.exp +++ b/gcc/testsuite/g++.dg/graphite/graphite.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/g++.dg/init/const9.C b/gcc/testsuite/g++.dg/init/const9.C new file mode 100644 index 00000000000..ba1dfd4bc46 --- /dev/null +++ b/gcc/testsuite/g++.dg/init/const9.C @@ -0,0 +1,12 @@ +// PR c++/55893 +// { dg-final { scan-assembler-not "rodata" } } + +struct foo +{ + virtual ~foo (); +}; + +int main () +{ + static const foo tmp; +} diff --git a/gcc/testsuite/g++.dg/ipa/devirt-10.C b/gcc/testsuite/g++.dg/ipa/devirt-10.C new file mode 100644 index 00000000000..6550ff0991e --- /dev/null +++ b/gcc/testsuite/g++.dg/ipa/devirt-10.C @@ -0,0 +1,34 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -fdump-ipa-inline -fdump-ipa-cp" } */ +class wxPaintEvent { }; +struct wxDCBase +{ + wxDCBase (); + virtual int GetLayoutDirection() const{} + virtual void SetLayoutDirection(int){} +}; +struct wxWindowDC : public wxDCBase {}; +struct wxBufferedDC : public wxDCBase +{ + void Init(wxDCBase*dc) { + InitCommon(dc); + } + void InitCommon(wxDCBase*dc) { + if (dc) + SetLayoutDirection(dc->GetLayoutDirection()); + } +}; +struct wxBufferedPaintDC : public wxBufferedDC { + wxBufferedPaintDC() { + Init(&m_paintdc); + } + wxWindowDC m_paintdc; +}; +void OnPaint(wxPaintEvent & event) { + wxBufferedPaintDC dc; +} +/* IPA-CP should really discover both cases, but for time being the second is handled by inliner. */ +/* { dg-final { scan-ipa-dump-times "Discovered a virtual call to a known target" 1 "inline" } } */ +/* { dg-final { scan-ipa-dump-times "Discovered a virtual call to a known target" 1 "cp" } } */ +/* { dg-final { cleanup-ipa-dump "inline" } } */ +/* { dg-final { cleanup-ipa-dump "cp" } } */ diff --git a/gcc/testsuite/g++.dg/lto/lto.exp b/gcc/testsuite/g++.dg/lto/lto.exp index 62d8250314c..29cf3be991d 100644 --- a/gcc/testsuite/g++.dg/lto/lto.exp +++ b/gcc/testsuite/g++.dg/lto/lto.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/g++.dg/pch/pch.exp b/gcc/testsuite/g++.dg/pch/pch.exp index 209a6a52c1e..0c5e13319ee 100644 --- a/gcc/testsuite/g++.dg/pch/pch.exp +++ b/gcc/testsuite/g++.dg/pch/pch.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2002, 2003, 2007 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/g++.dg/plugin/plugin.exp b/gcc/testsuite/g++.dg/plugin/plugin.exp index f7a80159f0e..c26b8794e10 100644 --- a/gcc/testsuite/g++.dg/plugin/plugin.exp +++ b/gcc/testsuite/g++.dg/plugin/plugin.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2009, 2011 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/g++.dg/simulate-thread/simulate-thread.exp b/gcc/testsuite/g++.dg/simulate-thread/simulate-thread.exp index 01e4aaf63cf..8f56f267ce8 100644 --- a/gcc/testsuite/g++.dg/simulate-thread/simulate-thread.exp +++ b/gcc/testsuite/g++.dg/simulate-thread/simulate-thread.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2011 Free Software Foundation, Inc. +# Copyright (C) 2011-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/g++.dg/special/ecos.exp b/gcc/testsuite/g++.dg/special/ecos.exp index eb0c1eacdd5..1e73e8afda8 100644 --- a/gcc/testsuite/g++.dg/special/ecos.exp +++ b/gcc/testsuite/g++.dg/special/ecos.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1999, 2001, 2003, 2007 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/g++.dg/template/typeid1.C b/gcc/testsuite/g++.dg/template/typeid1.C new file mode 100644 index 00000000000..6df5f71ff78 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/typeid1.C @@ -0,0 +1,17 @@ +// PR c++/55878 + +#include <typeinfo> + +struct S; + +template <typename T> +static bool fn (S *s) +{ + return typeid (*s) == typeid (T); +} + +struct S +{ +}; + +bool x = fn<S> (__null); diff --git a/gcc/testsuite/g++.dg/tls/thread_local-cse.C b/gcc/testsuite/g++.dg/tls/thread_local-cse.C index e3b13787d4d..486a986664d 100644 --- a/gcc/testsuite/g++.dg/tls/thread_local-cse.C +++ b/gcc/testsuite/g++.dg/tls/thread_local-cse.C @@ -1,7 +1,8 @@ // Test for CSE of the wrapper function: we should only call it once // for the two references to ir. -// { dg-do run { xfail *-*-solaris2.9 } } +// { dg-do run } // { dg-options "-std=c++11 -O -fno-inline -save-temps" } +// { dg-add-options tls } // { dg-require-effective-target tls_runtime } // { dg-require-alias } // { dg-final { scan-assembler-times "call *_ZTW2ir" 1 { xfail *-*-* } } } diff --git a/gcc/testsuite/g++.dg/tls/thread_local-ice.C b/gcc/testsuite/g++.dg/tls/thread_local-ice.C new file mode 100644 index 00000000000..174aac42adb --- /dev/null +++ b/gcc/testsuite/g++.dg/tls/thread_local-ice.C @@ -0,0 +1,6 @@ +// PR c++/55801 +// { dg-options "-std=c++11" } +// { dg-require-effective-target tls } + +class C; +thread_local C O, O2 = O; // { dg-error "incomplete" } diff --git a/gcc/testsuite/g++.dg/tls/thread_local-order1.C b/gcc/testsuite/g++.dg/tls/thread_local-order1.C index 70e71bfab33..231b290dea7 100644 --- a/gcc/testsuite/g++.dg/tls/thread_local-order1.C +++ b/gcc/testsuite/g++.dg/tls/thread_local-order1.C @@ -1,5 +1,6 @@ // { dg-do run } // { dg-options "-std=c++11" } +// { dg-add-options tls } // { dg-require-effective-target tls_runtime } // { dg-require-alias } // { dg-require-cxa-atexit "" } diff --git a/gcc/testsuite/g++.dg/tls/thread_local-order2.C b/gcc/testsuite/g++.dg/tls/thread_local-order2.C index eb9c7690160..2d85eca2c1e 100644 --- a/gcc/testsuite/g++.dg/tls/thread_local-order2.C +++ b/gcc/testsuite/g++.dg/tls/thread_local-order2.C @@ -4,6 +4,7 @@ // { dg-do run { xfail *-*-* } } // { dg-options "-std=c++11" } +// { dg-add-options tls } // { dg-require-effective-target tls_runtime } // { dg-require-alias } diff --git a/gcc/testsuite/g++.dg/tls/thread_local2.C b/gcc/testsuite/g++.dg/tls/thread_local2.C index 7e5f41e8f67..bb255de7a14 100644 --- a/gcc/testsuite/g++.dg/tls/thread_local2.C +++ b/gcc/testsuite/g++.dg/tls/thread_local2.C @@ -1,5 +1,6 @@ -// { dg-do run { xfail *-*-solaris2.9 } } +// { dg-do run } // { dg-options "-std=c++11" } +// { dg-add-options tls } // { dg-require-effective-target tls_runtime } extern "C" void abort(); diff --git a/gcc/testsuite/g++.dg/tls/thread_local2g.C b/gcc/testsuite/g++.dg/tls/thread_local2g.C index dd057c4dac0..e1ad20dd8c8 100644 --- a/gcc/testsuite/g++.dg/tls/thread_local2g.C +++ b/gcc/testsuite/g++.dg/tls/thread_local2g.C @@ -1,5 +1,6 @@ -// { dg-do run { xfail *-*-solaris2.9 } } +// { dg-do run } // { dg-options "-std=c++11" } +// { dg-add-options tls } // { dg-require-effective-target tls_runtime } // { dg-require-alias } diff --git a/gcc/testsuite/g++.dg/tls/thread_local3.C b/gcc/testsuite/g++.dg/tls/thread_local3.C index 461f1267699..e05a0b95306 100644 --- a/gcc/testsuite/g++.dg/tls/thread_local3.C +++ b/gcc/testsuite/g++.dg/tls/thread_local3.C @@ -3,6 +3,7 @@ // { dg-require-effective-target tls_runtime } // { dg-require-effective-target pthread } // { dg-options -pthread } +// { dg-add-options tls } int c; int d; diff --git a/gcc/testsuite/g++.dg/tls/thread_local3g.C b/gcc/testsuite/g++.dg/tls/thread_local3g.C index 2f2888baeeb..19a213e0006 100644 --- a/gcc/testsuite/g++.dg/tls/thread_local3g.C +++ b/gcc/testsuite/g++.dg/tls/thread_local3g.C @@ -5,6 +5,7 @@ // { dg-require-alias } // { dg-require-cxa-atexit "" } // { dg-options -pthread } +// { dg-add-options tls } int c; int d; diff --git a/gcc/testsuite/g++.dg/tls/thread_local4.C b/gcc/testsuite/g++.dg/tls/thread_local4.C index 53b1f0519be..acf1cae5294 100644 --- a/gcc/testsuite/g++.dg/tls/thread_local4.C +++ b/gcc/testsuite/g++.dg/tls/thread_local4.C @@ -5,6 +5,7 @@ // { dg-require-effective-target tls_runtime } // { dg-require-effective-target pthread } // { dg-options -pthread } +// { dg-add-options tls } #include <pthread.h> #include <unistd.h> diff --git a/gcc/testsuite/g++.dg/tls/thread_local4g.C b/gcc/testsuite/g++.dg/tls/thread_local4g.C index 59041867c2d..f9c4b77aef0 100644 --- a/gcc/testsuite/g++.dg/tls/thread_local4g.C +++ b/gcc/testsuite/g++.dg/tls/thread_local4g.C @@ -7,6 +7,7 @@ // { dg-require-alias } // { dg-require-cxa-atexit "" } // { dg-options -pthread } +// { dg-add-options tls } #include <pthread.h> #include <unistd.h> diff --git a/gcc/testsuite/g++.dg/tls/thread_local5.C b/gcc/testsuite/g++.dg/tls/thread_local5.C index 7ce02f62b97..8d17584edd2 100644 --- a/gcc/testsuite/g++.dg/tls/thread_local5.C +++ b/gcc/testsuite/g++.dg/tls/thread_local5.C @@ -5,6 +5,7 @@ // { dg-require-effective-target tls_runtime } // { dg-require-effective-target pthread } // { dg-options -pthread } +// { dg-add-options tls } #include <pthread.h> #include <unistd.h> diff --git a/gcc/testsuite/g++.dg/tls/thread_local5g.C b/gcc/testsuite/g++.dg/tls/thread_local5g.C index 0fb6ceaac5e..1e3c9b70930 100644 --- a/gcc/testsuite/g++.dg/tls/thread_local5g.C +++ b/gcc/testsuite/g++.dg/tls/thread_local5g.C @@ -7,6 +7,7 @@ // { dg-require-alias } // { dg-require-cxa-atexit "" } // { dg-options -pthread } +// { dg-add-options tls } #include <pthread.h> #include <unistd.h> diff --git a/gcc/testsuite/g++.dg/tls/thread_local6.C b/gcc/testsuite/g++.dg/tls/thread_local6.C index dcbcef59665..39dd6029eb9 100644 --- a/gcc/testsuite/g++.dg/tls/thread_local6.C +++ b/gcc/testsuite/g++.dg/tls/thread_local6.C @@ -1,7 +1,8 @@ // Test for cleanups in the main thread without -pthread. -// { dg-do run { xfail *-*-solaris2.9 } } +// { dg-do run } // { dg-options "-std=c++11" } +// { dg-add-options tls } // { dg-require-effective-target tls_runtime } extern "C" void _exit (int); diff --git a/gcc/testsuite/g++.dg/tls/thread_local6g.C b/gcc/testsuite/g++.dg/tls/thread_local6g.C index 3a680fb5eb8..57270aaa280 100644 --- a/gcc/testsuite/g++.dg/tls/thread_local6g.C +++ b/gcc/testsuite/g++.dg/tls/thread_local6g.C @@ -2,6 +2,7 @@ // { dg-do run } // { dg-options "-std=c++11" } +// { dg-add-options tls } // { dg-require-effective-target tls_runtime } // { dg-require-cxa-atexit "" } // { dg-require-alias } diff --git a/gcc/testsuite/g++.dg/tls/tls.exp b/gcc/testsuite/g++.dg/tls/tls.exp index 44de9597905..a52040d2d38 100644 --- a/gcc/testsuite/g++.dg/tls/tls.exp +++ b/gcc/testsuite/g++.dg/tls/tls.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2002, 2005, 2007, 2011 Free Software Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/g++.dg/tm/tm.exp b/gcc/testsuite/g++.dg/tm/tm.exp index 46cba12c8ec..42ecf545a69 100644 --- a/gcc/testsuite/g++.dg/tm/tm.exp +++ b/gcc/testsuite/g++.dg/tm/tm.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2009, 2011, 2012 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/g++.dg/torture/pr55875.C b/gcc/testsuite/g++.dg/torture/pr55875.C new file mode 100644 index 00000000000..faadf88f495 --- /dev/null +++ b/gcc/testsuite/g++.dg/torture/pr55875.C @@ -0,0 +1,55 @@ +// { dg-do run } + +struct A +{ + short int a1; + unsigned char a2; + unsigned int a3; +}; + +struct B +{ + unsigned short b1; + const A *b2; +}; + +B b; + +__attribute__((noinline, noclone)) +int foo (unsigned x) +{ + __asm volatile ("" : "+r" (x) : : "memory"); + return x; +} + +inline void +bar (const int &) +{ +} + +__attribute__((noinline)) void +baz () +{ + const A *a = b.b2; + unsigned int i; + unsigned short n = b.b1; + for (i = 0; i < n; ++i) + if (a[i].a1 == 11) + { + if (i > 0 && (a[i - 1].a2 & 1)) + continue; + bar (foo (2)); + return; + } +} + +int +main () +{ + A a[4] = { { 10, 0, 0 }, { 11, 1, 0 }, { 11, 1, 0 }, { 11, 1, 0 } }; + b.b1 = 4; + b.b2 = a; + baz (); + return 0; +} + diff --git a/gcc/testsuite/g++.dg/torture/stackalign/stackalign.exp b/gcc/testsuite/g++.dg/torture/stackalign/stackalign.exp index b02f299277b..e6120194819 100644 --- a/gcc/testsuite/g++.dg/torture/stackalign/stackalign.exp +++ b/gcc/testsuite/g++.dg/torture/stackalign/stackalign.exp @@ -1,5 +1,4 @@ -# Copyright (C) 2008, 2010, 2012 -# Free Software Foundation, Inc. +# Copyright (C) 2008-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/g++.dg/tree-prof/tree-prof.exp b/gcc/testsuite/g++.dg/tree-prof/tree-prof.exp index bf287da61f4..a67484b0f9d 100644 --- a/gcc/testsuite/g++.dg/tree-prof/tree-prof.exp +++ b/gcc/testsuite/g++.dg/tree-prof/tree-prof.exp @@ -1,5 +1,4 @@ -# Copyright (C) 2001, 2002, 2004, 2005, 2007, 2008, 2011, 2012 -# Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/g++.dg/vect/vect.exp b/gcc/testsuite/g++.dg/vect/vect.exp index 7149ee3c129..05b93b1916d 100644 --- a/gcc/testsuite/g++.dg/vect/vect.exp +++ b/gcc/testsuite/g++.dg/vect/vect.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2007, 2008, 2010, 2011 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/README b/gcc/testsuite/g++.old-deja/g++.brendan/README index c547c1bdda2..83015b5ea50 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/README +++ b/gcc/testsuite/g++.old-deja/g++.brendan/README @@ -40,7 +40,7 @@ visibility - access control and visibility checking warnings - warning messages -Copyright (C) 1997, 1998 Free Software Foundation, Inc. +Copyright (C) 1997-2013 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff --git a/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog-2005 b/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog-2005 index 995ac91835a..ea3da34a04c 100644 --- a/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog-2005 +++ b/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog-2005 @@ -120,7 +120,7 @@ * template1.C: New test. -Copyright (C) 1999, 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +Copyright (C) 1999-2005 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/README b/gcc/testsuite/g++.old-deja/g++.robertl/README index 220d57d3d75..c6a7c362f83 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/README +++ b/gcc/testsuite/g++.old-deja/g++.robertl/README @@ -18,7 +18,7 @@ We'll do better now. Robert Lipe -Copyright (C) 1998 Free Software Foundation, Inc. +Copyright (C) 1998-2013 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff --git a/gcc/testsuite/g++.old-deja/old-deja.exp b/gcc/testsuite/g++.old-deja/old-deja.exp index c941f40f73a..39f8ffdaf36 100644 --- a/gcc/testsuite/g++.old-deja/old-deja.exp +++ b/gcc/testsuite/g++.old-deja/old-deja.exp @@ -1,5 +1,4 @@ -# Copyright (C) 1988, 90, 91, 92, 1994, 1997, 2000, 2003, 2007 -# Free Software Foundation, Inc. +# Copyright (C) 1988-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.c-torture/ChangeLog.0 b/gcc/testsuite/gcc.c-torture/ChangeLog.0 index 113abe2c4a7..bae6c36a08d 100644 --- a/gcc/testsuite/gcc.c-torture/ChangeLog.0 +++ b/gcc/testsuite/gcc.c-torture/ChangeLog.0 @@ -628,7 +628,7 @@ Wed Jun 1 01:57:45 1995 Torbjorn Granlund <tege@bozo.matematik.su.se> * execute/divconst-[12].c: New tests. -Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. +Copyright (C) 1995-1997 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff --git a/gcc/testsuite/gcc.c-torture/compile/compile.exp b/gcc/testsuite/gcc.c-torture/compile/compile.exp index 01c5644ff21..82c0414f862 100644 --- a/gcc/testsuite/gcc.c-torture/compile/compile.exp +++ b/gcc/testsuite/gcc.c-torture/compile/compile.exp @@ -1,5 +1,5 @@ # Expect driver script for GCC Regression Tests -# Copyright (C) 1993, 1995, 1997, 2003, 2007 Free Software Foundation +# Copyright (C) 1993-2013 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.c-torture/compile/pr55569.c b/gcc/testsuite/gcc.c-torture/compile/pr55569.c new file mode 100644 index 00000000000..2a53c803957 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr55569.c @@ -0,0 +1,11 @@ +/* { dg-options "-O1 -ftree-vectorize" } */ +int *bar (void); + +void +foo (void) +{ + long x; + int *y = bar (); + for (x = -1 / sizeof (int); x; --x, ++y) + *y = 0; +} diff --git a/gcc/testsuite/gcc.c-torture/compile/pr55851.c b/gcc/testsuite/gcc.c-torture/compile/pr55851.c new file mode 100644 index 00000000000..6198a7339cc --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr55851.c @@ -0,0 +1,12 @@ +/* PR middle-end/55851 */ + +enum { A = 1UL, B = -1UL } var = A; +void foo (char *); + +void +test (void) +{ + char vla[1][var]; + vla[0][0] = 1; + foo (&vla[0][0]); +} diff --git a/gcc/testsuite/gcc.c-torture/compile/pr55921.c b/gcc/testsuite/gcc.c-torture/compile/pr55921.c new file mode 100644 index 00000000000..8ac9e9b6a64 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr55921.c @@ -0,0 +1,21 @@ +/* PR tree-optimization/55921 */ + +typedef union +{ + _Complex float cf; + long long ll; +} ucf; + +void +foo (ucf *in, ucf *out, _Complex float r) +{ + int i; + ucf ucf1; + _Complex float cf; + + ucf1.ll = in[i].ll; + __asm ("" : "=r" (cf) : "0" (ucf1.ll)); + cf *= r; + __asm ("" : "=r" (ucf1.ll) : "0" (cf)); + out[i].ll = ucf1.ll; +} diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp index f7cc82b1062..7588f9aea38 100644 --- a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp +++ b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2003, 2008 Free Software Foundation, Inc. +# Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file is part of GCC. # diff --git a/gcc/testsuite/gcc.c-torture/execute/execute.exp b/gcc/testsuite/gcc.c-torture/execute/execute.exp index a26e5907639..e87ab518c6e 100644 --- a/gcc/testsuite/gcc.c-torture/execute/execute.exp +++ b/gcc/testsuite/gcc.c-torture/execute/execute.exp @@ -1,5 +1,4 @@ -# Copyright (C) 1991, 1992, 1993, 1995, 1997, 2007, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1991-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp b/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp index d15e90a525a..9ad2acc08d9 100644 --- a/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp +++ b/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp @@ -1,6 +1,6 @@ # # Expect driver script for GCC Regression Tests -# Copyright (C) 1993, 1996, 2001, 2005, 2007, 2008, 2010 Free Software Foundation +# Copyright (C) 1993-2013 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.c-torture/execute/pr55875.c b/gcc/testsuite/gcc.c-torture/execute/pr55875.c new file mode 100644 index 00000000000..4a0ce1b1bc1 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr55875.c @@ -0,0 +1,17 @@ +int a[250]; +__attribute__ ((noinline)) +t(int i) +{ + if (i==0) + exit(0); + if (i>255) + abort (); +} +main() +{ + unsigned int i; + for (i=0;;i++) + { + a[i]=t((unsigned char)(i+5)); + } +} diff --git a/gcc/testsuite/gcc.c-torture/unsorted/unsorted.exp b/gcc/testsuite/gcc.c-torture/unsorted/unsorted.exp index def4bc5afb6..bb0dd90034b 100644 --- a/gcc/testsuite/gcc.c-torture/unsorted/unsorted.exp +++ b/gcc/testsuite/gcc.c-torture/unsorted/unsorted.exp @@ -1,6 +1,6 @@ # # Expect driver script for GCC Regression Tests -# Copyright (C) 1993, 1997, 2007, 2008 Free Software Foundation +# Copyright (C) 1993-2013 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/README b/gcc/testsuite/gcc.dg/README index 3a3d8ef6118..bcecb36ca74 100644 --- a/gcc/testsuite/gcc.dg/README +++ b/gcc/testsuite/gcc.dg/README @@ -16,7 +16,7 @@ Notes for testsuite/gcc.dg. 4) Send bugs, comments, etc. to dje@cygnus.com. -Copyright (C) 1997, 1998 Free Software Foundation, Inc. +Copyright (C) 1997-2013 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff --git a/gcc/testsuite/gcc.dg/asan/asan.exp b/gcc/testsuite/gcc.dg/asan/asan.exp index ef1c6e37331..30ac3a450e8 100644 --- a/gcc/testsuite/gcc.dg/asan/asan.exp +++ b/gcc/testsuite/gcc.dg/asan/asan.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2012 Free Software Foundation, Inc. +# Copyright (C) 2012-2013 Free Software Foundation, Inc. # # This file is part of GCC. # diff --git a/gcc/testsuite/gcc.dg/autopar/autopar.exp b/gcc/testsuite/gcc.dg/autopar/autopar.exp index d19e51f7fe0..93df1354888 100644 --- a/gcc/testsuite/gcc.dg/autopar/autopar.exp +++ b/gcc/testsuite/gcc.dg/autopar/autopar.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2008 Free Software Foundation, Inc. +# Copyright (C) 2008-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/charset/charset.exp b/gcc/testsuite/gcc.dg/charset/charset.exp index 7e3a1348ef4..760d816628c 100644 --- a/gcc/testsuite/gcc.dg/charset/charset.exp +++ b/gcc/testsuite/gcc.dg/charset/charset.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2007 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/compat/compat.exp b/gcc/testsuite/gcc.dg/compat/compat.exp index 1302d52597e..479575fc0bd 100644 --- a/gcc/testsuite/gcc.dg/compat/compat.exp +++ b/gcc/testsuite/gcc.dg/compat/compat.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp b/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp index e541f6ed3ad..aa9e35e106a 100644 --- a/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp +++ b/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2002, 2003, 2004, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/cpp/assembl2.S b/gcc/testsuite/gcc.dg/cpp/assembl2.S index 0cfad1fa24d..e9cd8b6890f 100644 --- a/gcc/testsuite/gcc.dg/cpp/assembl2.S +++ b/gcc/testsuite/gcc.dg/cpp/assembl2.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. */ +/* Copyright (C) 2000-2013 Free Software Foundation, Inc. */ /* { dg-do preprocess } */ diff --git a/gcc/testsuite/gcc.dg/cpp/cpp.exp b/gcc/testsuite/gcc.dg/cpp/cpp.exp index 49b857145ad..2f96a5fdb51 100644 --- a/gcc/testsuite/gcc.dg/cpp/cpp.exp +++ b/gcc/testsuite/gcc.dg/cpp/cpp.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2000, 2003, 2007, 2010 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/cpp/trad/trad.exp b/gcc/testsuite/gcc.dg/cpp/trad/trad.exp index 190cfcfdee6..b8723c3b813 100644 --- a/gcc/testsuite/gcc.dg/cpp/trad/trad.exp +++ b/gcc/testsuite/gcc.dg/cpp/trad/trad.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2000, 2007 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/debug/debug.exp b/gcc/testsuite/gcc.dg/debug/debug.exp index 94c1564a2c4..c45569439f7 100644 --- a/gcc/testsuite/gcc.dg/debug/debug.exp +++ b/gcc/testsuite/gcc.dg/debug/debug.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2002, 2007 Free Software Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp index dfc387dbe8f..829840c2052 100644 --- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/dfp/dfp.exp b/gcc/testsuite/gcc.dg/dfp/dfp.exp index 73edb7fc13e..fc7966e81a0 100644 --- a/gcc/testsuite/gcc.dg/dfp/dfp.exp +++ b/gcc/testsuite/gcc.dg/dfp/dfp.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. +# Copyright (C) 2005-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/dg.exp b/gcc/testsuite/gcc.dg/dg.exp index 3f71178f98e..8a5cfca4875 100644 --- a/gcc/testsuite/gcc.dg/dg.exp +++ b/gcc/testsuite/gcc.dg/dg.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2007 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/fixed-point/fixed-point.exp b/gcc/testsuite/gcc.dg/fixed-point/fixed-point.exp index bdb241f48af..49dbafe06c4 100644 --- a/gcc/testsuite/gcc.dg/fixed-point/fixed-point.exp +++ b/gcc/testsuite/gcc.dg/fixed-point/fixed-point.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2004, 2009 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/format/format.exp b/gcc/testsuite/gcc.dg/format/format.exp index 352149850e3..4191b4a73dc 100644 --- a/gcc/testsuite/gcc.dg/format/format.exp +++ b/gcc/testsuite/gcc.dg/format/format.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2000, 2001, 2007 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/gomp/gomp.exp b/gcc/testsuite/gcc.dg/gomp/gomp.exp index a1e13fcbe0f..ca8aefd3c4e 100644 --- a/gcc/testsuite/gcc.dg/gomp/gomp.exp +++ b/gcc/testsuite/gcc.dg/gomp/gomp.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2011 Free Software Foundation, Inc. +# Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file is part of GCC. # diff --git a/gcc/testsuite/gcc.dg/graphite/graphite.exp b/gcc/testsuite/gcc.dg/graphite/graphite.exp index 76e3965bc6a..72db6dc4d5b 100644 --- a/gcc/testsuite/gcc.dg/graphite/graphite.exp +++ b/gcc/testsuite/gcc.dg/graphite/graphite.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007, 2008, 2010, 2011 Free Software Foundation, Inc. +# Copyright (C) 2006-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/guality/pr54693.c b/gcc/testsuite/gcc.dg/guality/pr54693.c index adc2dfd0326..b852c06abbc 100644 --- a/gcc/testsuite/gcc.dg/guality/pr54693.c +++ b/gcc/testsuite/gcc.dg/guality/pr54693.c @@ -21,6 +21,7 @@ main () c = 0x30 + i; foo (&arr[i], c); /* { dg-final { gdb-test 22 "i" "c - 48" } } */ } + arr[10] = 0; __builtin_printf ("arr = %s\n", arr); return 0; diff --git a/gcc/testsuite/gcc.dg/ipa/ipa.exp b/gcc/testsuite/gcc.dg/ipa/ipa.exp index 1bbfee7cf2e..3e0d458034c 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa.exp +++ b/gcc/testsuite/gcc.dg/ipa/ipa.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2004, 2007 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/lto/lto.exp b/gcc/testsuite/gcc.dg/lto/lto.exp index 48b597c7022..00039dcff79 100644 --- a/gcc/testsuite/gcc.dg/lto/lto.exp +++ b/gcc/testsuite/gcc.dg/lto/lto.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/lto/pr55525_0.c b/gcc/testsuite/gcc.dg/lto/pr55525_0.c index 7f06918a41f..7faaf806a75 100644 --- a/gcc/testsuite/gcc.dg/lto/pr55525_0.c +++ b/gcc/testsuite/gcc.dg/lto/pr55525_0.c @@ -1,7 +1,7 @@ /* { dg-lto-do link } */ /* { dg-lto-options { { -flto -w } } } */ -char s[8]; +char s[sizeof (char *)]; int main(void) { return strcmp(&s[1], "foo"); diff --git a/gcc/testsuite/gcc.dg/noncompile/noncompile.exp b/gcc/testsuite/gcc.dg/noncompile/noncompile.exp index cc77a7d2b93..6d11bb064a3 100644 --- a/gcc/testsuite/gcc.dg/noncompile/noncompile.exp +++ b/gcc/testsuite/gcc.dg/noncompile/noncompile.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2000, 2007 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/pch/pch.exp b/gcc/testsuite/gcc.dg/pch/pch.exp index 132e595cc37..4144243a7a1 100644 --- a/gcc/testsuite/gcc.dg/pch/pch.exp +++ b/gcc/testsuite/gcc.dg/pch/pch.exp @@ -1,5 +1,4 @@ -# Copyright (C) 1997, 2002, 2003, 2007, 2009, 2010 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/plugin/plugin.exp b/gcc/testsuite/gcc.dg/plugin/plugin.exp index 444bd1bb6d2..92f1f3a6069 100644 --- a/gcc/testsuite/gcc.dg/plugin/plugin.exp +++ b/gcc/testsuite/gcc.dg/plugin/plugin.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2009, 2010 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/pr44061.c b/gcc/testsuite/gcc.dg/pr44061.c new file mode 100644 index 00000000000..60a4260ae94 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr44061.c @@ -0,0 +1,16 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -Wall" } */ + +int a[2]; +int foo (int q) +{ + if (__builtin_constant_p (q)) + { + if (q == 4) + return a[4]; /* { dg-bogus "array subscript is above array bounds" } */ + else + return a[0]; + } + else + return a[q]; +} diff --git a/gcc/testsuite/gcc.dg/pr48189.c b/gcc/testsuite/gcc.dg/pr48189.c new file mode 100644 index 00000000000..86b995dc984 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr48189.c @@ -0,0 +1,13 @@ +/* PR tree-optimization/48189 */ +/* { dg-do compile } */ +/* { dg-options "-O --param max-predicted-iterations=0" } */ + +struct S { int s[8]; }; + +void +foo (int *x, struct S *y) +{ + int i; + for (i = 0; y[i].s[i]; i++) + *x++ = y[i].s[i]; +} diff --git a/gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.exp b/gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.exp index f8fb8fc8bcc..671e77eb471 100644 --- a/gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.exp +++ b/gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2011, 2012 Free Software Foundation, Inc. +# Copyright (C) 2011-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/special/mips-abi.exp b/gcc/testsuite/gcc.dg/special/mips-abi.exp index 3af47be511d..fe406be392e 100644 --- a/gcc/testsuite/gcc.dg/special/mips-abi.exp +++ b/gcc/testsuite/gcc.dg/special/mips-abi.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2002, 2004, 2007 Free Software Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/special/special.exp b/gcc/testsuite/gcc.dg/special/special.exp index bb6ef85bd9b..289bcdb5f0f 100644 --- a/gcc/testsuite/gcc.dg/special/special.exp +++ b/gcc/testsuite/gcc.dg/special/special.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2001, 2003, 2007 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/tls/tls.exp b/gcc/testsuite/gcc.dg/tls/tls.exp index 890e05e559c..7d4a10e33c6 100644 --- a/gcc/testsuite/gcc.dg/tls/tls.exp +++ b/gcc/testsuite/gcc.dg/tls/tls.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2002, 2005, 2007 Free Software Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/tm/tm.exp b/gcc/testsuite/gcc.dg/tm/tm.exp index df4bd9aa221..b90fb0d79f1 100644 --- a/gcc/testsuite/gcc.dg/tm/tm.exp +++ b/gcc/testsuite/gcc.dg/tm/tm.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2009, 2011, 2012 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/torture/pr55888.c b/gcc/testsuite/gcc.dg/torture/pr55888.c new file mode 100644 index 00000000000..e75adcd2c62 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr55888.c @@ -0,0 +1,116 @@ +/* { dg-do compile } */ + +typedef unsigned _GCC_ATTR_ALIGN_u32t; +typedef _GCC_ATTR_ALIGN_u32t _Uint32t __attribute__ ((__aligned__ (4))); +typedef unsigned int _GCC_ATTR_ALIGN_u8t __attribute__ ((__mode__ (__QI__))); +typedef _GCC_ATTR_ALIGN_u8t _Uint8t __attribute__ ((__aligned__ (1))); +typedef unsigned _Sizet; +typedef _Sizet size_t; +typedef _Uint8t uint8_t; +typedef _Uint32t uint32_t; +typedef enum +{ + PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_LABEL_REPEATED +} +ProtobufCLabel; +typedef enum +{ + PROTOBUF_C_TYPE_INT32, PROTOBUF_C_TYPE_SINT32, PROTOBUF_C_TYPE_SFIXED32, + PROTOBUF_C_TYPE_INT64, PROTOBUF_C_TYPE_SINT64, PROTOBUF_C_TYPE_SFIXED64, + PROTOBUF_C_TYPE_UINT32, PROTOBUF_C_TYPE_FIXED32, PROTOBUF_C_TYPE_UINT64, + PROTOBUF_C_TYPE_FIXED64, PROTOBUF_C_TYPE_FLOAT, PROTOBUF_C_TYPE_DOUBLE, + PROTOBUF_C_TYPE_BOOL, PROTOBUF_C_TYPE_ENUM, PROTOBUF_C_TYPE_STRING, + PROTOBUF_C_TYPE_BYTES, PROTOBUF_C_TYPE_MESSAGE, +} +ProtobufCType; +typedef struct _ProtobufCBinaryData ProtobufCBinaryData; +struct _ProtobufCBinaryData +{ + size_t len; +}; +typedef struct _ProtobufCMessageDescriptor ProtobufCMessageDescriptor; +typedef struct _ProtobufCFieldDescriptor ProtobufCFieldDescriptor; +typedef struct _ProtobufCMessage ProtobufCMessage; +struct _ProtobufCFieldDescriptor +{ + uint32_t id; + ProtobufCLabel label; + ProtobufCType type; + unsigned offset; +}; +struct _ProtobufCMessageDescriptor +{ + unsigned n_fields; + const ProtobufCFieldDescriptor *fields; +}; +struct _ProtobufCMessage +{ + const ProtobufCMessageDescriptor *descriptor; +}; +typedef enum +{ + PROTOBUF_C_WIRE_TYPE_VARINT, PROTOBUF_C_WIRE_TYPE_64BIT, + PROTOBUF_C_WIRE_TYPE_LENGTH_PREFIXED, PROTOBUF_C_WIRE_TYPE_START_GROUP, + PROTOBUF_C_WIRE_TYPE_END_GROUP, PROTOBUF_C_WIRE_TYPE_32BIT +} +ProtobufCWireType; +static inline size_t +uint32_pack (uint32_t value, uint8_t * out) +{ + unsigned rv = 0; + if (value >= 0x80) + { + if (value >= 0x80) + { + value >>= 7; + } + } + out[rv++] = value; +} + +static inline size_t +binary_data_pack (const ProtobufCBinaryData * bd, uint8_t * out) +{ + size_t len = bd->len; + size_t rv = uint32_pack (len, out); + return rv + len; +} + +static size_t +required_field_pack (const ProtobufCFieldDescriptor * field, + const void *member, uint8_t * out) +{ + size_t rv = tag_pack (field->id, out); + switch (field->type) + { + case PROTOBUF_C_TYPE_BYTES: + { + const ProtobufCBinaryData *bd = + ((const ProtobufCBinaryData *) member); + out[0] |= PROTOBUF_C_WIRE_TYPE_LENGTH_PREFIXED; + return rv + binary_data_pack (bd, out + rv); + } + case PROTOBUF_C_TYPE_MESSAGE: + { + out[0] |= PROTOBUF_C_WIRE_TYPE_LENGTH_PREFIXED; + return rv + + prefixed_message_pack (*(ProtobufCMessage * const *) member, + out + rv); + } + } +} + +size_t +protobuf_c_message_pack (const ProtobufCMessage * message, uint8_t * out) +{ + unsigned i; + size_t rv = 0; + for (i = 0; i < message->descriptor->n_fields; i++) + { + const ProtobufCFieldDescriptor *field = message->descriptor->fields + i; + const void *member = ((const char *) message) + field->offset; + if (field->label == PROTOBUF_C_LABEL_REQUIRED) + rv += required_field_pack (field, member, out + rv); + } +} diff --git a/gcc/testsuite/gcc.dg/torture/pr55890-1.c b/gcc/testsuite/gcc.dg/torture/pr55890-1.c new file mode 100644 index 00000000000..9fd558ea03f --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr55890-1.c @@ -0,0 +1,6 @@ +/* { dg-do compile } */ + +extern void *memmove(void *, void *, __SIZE_TYPE__); +typedef int (*_TEST_fun_) (); +static _TEST_fun_ i = (_TEST_fun_) memmove; +main() { i(); } diff --git a/gcc/testsuite/gcc.dg/torture/pr55890-2.c b/gcc/testsuite/gcc.dg/torture/pr55890-2.c new file mode 100644 index 00000000000..a753e573dce --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr55890-2.c @@ -0,0 +1,4 @@ +/* { dg-do compile } */
+
+extern void *memcpy();
+main() { memcpy(); }
diff --git a/gcc/testsuite/gcc.dg/torture/pr55890-3.c b/gcc/testsuite/gcc.dg/torture/pr55890-3.c new file mode 100644 index 00000000000..c7f77be689d --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr55890-3.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ + +void *memmove (); + +void * +bar () +{ + return memmove (); +} diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/stackalign.exp b/gcc/testsuite/gcc.dg/torture/stackalign/stackalign.exp index dafac8de18e..2538797d873 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/stackalign.exp +++ b/gcc/testsuite/gcc.dg/torture/stackalign/stackalign.exp @@ -1,5 +1,4 @@ -# Copyright (C) 2008, 2010, 2012 -# Free Software Foundation, Inc. +# Copyright (C) 2008-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/torture/tls/tls.exp b/gcc/testsuite/gcc.dg/torture/tls/tls.exp index bbbd1dfd65d..a71ed9da360 100644 --- a/gcc/testsuite/gcc.dg/torture/tls/tls.exp +++ b/gcc/testsuite/gcc.dg/torture/tls/tls.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2010, 2011 Free Software Foundation, Inc. +# Copyright (C) 2010-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/tree-prof/tree-prof.exp b/gcc/testsuite/gcc.dg/tree-prof/tree-prof.exp index dc6becc9359..1f50eb3221b 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/tree-prof.exp +++ b/gcc/testsuite/gcc.dg/tree-prof/tree-prof.exp @@ -1,5 +1,4 @@ -# Copyright (C) 2001, 2002, 2004, 2005, 2007, 2008, 2011, 2012 -# Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr55579.c b/gcc/testsuite/gcc.dg/tree-ssa/pr55579.c new file mode 100644 index 00000000000..a4f18253b73 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr55579.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -g -fdump-tree-esra" } */ + +struct S { int a; char b; char c; short d; }; + +int +foo (int x) +{ + struct S s = { x + 1, x + 2, x + 3, x + 4 }; + char *p = &s.c; + return x; +} + +/* { dg-final { scan-tree-dump "Created a debug-only replacement for s" "esra" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/tree-ssa.exp b/gcc/testsuite/gcc.dg/tree-ssa/tree-ssa.exp index 14225223adf..220290a2127 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/tree-ssa.exp +++ b/gcc/testsuite/gcc.dg/tree-ssa/tree-ssa.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997,2002,2003, 2007 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c index 1ef6c922e86..cb6df0dcac9 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c @@ -25,7 +25,7 @@ foo (int i, int j, int a) return i + a + j; } -/* { dg-final { scan-tree-dump-times "Folding predicate i_.*to 0" 1 "vrp1" } } */ -/* { dg-final { scan-tree-dump-times "Folding predicate j_.*to 1" 1 "vrp1" } } */ -/* { dg-final { scan-tree-dump-times "Folding predicate i_.*to 0" 1 "vrp1" } } */ +/* { dg-final { scan-tree-dump-times "Folding predicate i_\[0-9\]+.*0 to 0" 1 "vrp1" } } */ +/* { dg-final { scan-tree-dump-times "Folding predicate j_\[0-9\]+.*0 to 1" 1 "vrp1" } } */ +/* { dg-final { scan-tree-dump-times "Folding predicate i_\[0-9]+.*j_\[0-9\]+.* to 0" 1 "vrp1" { xfail *-*-* } } } */ /* { dg-final { cleanup-tree-dump "vrp1" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp b/gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp index c6510060127..da80bba9d6c 100644 --- a/gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp +++ b/gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp @@ -1,5 +1,4 @@ -# Copyright (C) 1997, 2004, 2005, 2006, 2007, 2008, 2010 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp index 699a4946916..010d7459a1e 100644 --- a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp +++ b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp @@ -1,5 +1,4 @@ -# Copyright (C) 1997, 2004, 2005, 2006, 2007, 2010, 2012 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp b/gcc/testsuite/gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp index cde70c54ad3..cb18c15fa59 100644 --- a/gcc/testsuite/gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp +++ b/gcc/testsuite/gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp b/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp index 70929543f35..e32e33bb4fe 100644 --- a/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp +++ b/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp @@ -1,5 +1,4 @@ -# Copyright (C) 1997, 2004, 2005, 2006, 2007, 2008, 2011 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/vect/vect.exp b/gcc/testsuite/gcc.dg/vect/vect.exp index 14170666226..1b474c37ee1 100644 --- a/gcc/testsuite/gcc.dg/vect/vect.exp +++ b/gcc/testsuite/gcc.dg/vect/vect.exp @@ -1,5 +1,4 @@ -# Copyright (C) 1997, 2004, 2005, 2006, 2007, 2008, 2010, 2011, 2012 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/vmx/vmx.exp b/gcc/testsuite/gcc.dg/vmx/vmx.exp index 85c88d8a392..095e12fc1e4 100644 --- a/gcc/testsuite/gcc.dg/vmx/vmx.exp +++ b/gcc/testsuite/gcc.dg/vmx/vmx.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2006, 2007 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/vxworks/vxworks.exp b/gcc/testsuite/gcc.dg/vxworks/vxworks.exp index 8526c5866fb..b8c1b564f1e 100644 --- a/gcc/testsuite/gcc.dg/vxworks/vxworks.exp +++ b/gcc/testsuite/gcc.dg/vxworks/vxworks.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2007 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.dg/weak/weak.exp b/gcc/testsuite/gcc.dg/weak/weak.exp index 5dde31edb26..5590033467d 100644 --- a/gcc/testsuite/gcc.dg/weak/weak.exp +++ b/gcc/testsuite/gcc.dg/weak/weak.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2003, 2007 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.misc-tests/acker1.exp b/gcc/testsuite/gcc.misc-tests/acker1.exp index 58b9b1654eb..2f97fb73c58 100644 --- a/gcc/testsuite/gcc.misc-tests/acker1.exp +++ b/gcc/testsuite/gcc.misc-tests/acker1.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2007 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.misc-tests/arm-isr.exp b/gcc/testsuite/gcc.misc-tests/arm-isr.exp index 8c2d3227f0a..9ee904503db 100644 --- a/gcc/testsuite/gcc.misc-tests/arm-isr.exp +++ b/gcc/testsuite/gcc.misc-tests/arm-isr.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2001, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.misc-tests/bprob.exp b/gcc/testsuite/gcc.misc-tests/bprob.exp index 69e768bce2b..5e559b36967 100644 --- a/gcc/testsuite/gcc.misc-tests/bprob.exp +++ b/gcc/testsuite/gcc.misc-tests/bprob.exp @@ -1,5 +1,4 @@ -# Copyright (C) 2001, 2002, 2004, 2007, 2008, 2011, 2012 -# Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.misc-tests/dectest.exp b/gcc/testsuite/gcc.misc-tests/dectest.exp index b86f2adec5c..7027551da66 100644 --- a/gcc/testsuite/gcc.misc-tests/dectest.exp +++ b/gcc/testsuite/gcc.misc-tests/dectest.exp @@ -1,4 +1,4 @@ -# Copyright 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2005-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.misc-tests/dhry.exp b/gcc/testsuite/gcc.misc-tests/dhry.exp index c913a955d57..53926c4216d 100644 --- a/gcc/testsuite/gcc.misc-tests/dhry.exp +++ b/gcc/testsuite/gcc.misc-tests/dhry.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2007 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.misc-tests/gcov.exp b/gcc/testsuite/gcc.misc-tests/gcov.exp index 19ab270ecd2..5478cbf232d 100644 --- a/gcc/testsuite/gcc.misc-tests/gcov.exp +++ b/gcc/testsuite/gcc.misc-tests/gcov.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2001, 2007, 2011 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.misc-tests/help.exp b/gcc/testsuite/gcc.misc-tests/help.exp index 6c38c8fed38..7ad53926a53 100644 --- a/gcc/testsuite/gcc.misc-tests/help.exp +++ b/gcc/testsuite/gcc.misc-tests/help.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2007, 2009 Free Software Foundation, Inc. +# Copyright (C) 2005-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp b/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp index a9f767cde0a..0d3952345d1 100644 --- a/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp +++ b/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2002, 2004, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.misc-tests/linkage.exp b/gcc/testsuite/gcc.misc-tests/linkage.exp index a594dd4688e..e89236c137f 100644 --- a/gcc/testsuite/gcc.misc-tests/linkage.exp +++ b/gcc/testsuite/gcc.misc-tests/linkage.exp @@ -1,5 +1,4 @@ -# Copyright (C) 1988, 90-96, 1997, 2000, 2001, 2002, 2007, 2008, 2010, 2011, -# 2012 Free Software Foundation, Inc. +# Copyright (C) 1988-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.misc-tests/matrix1.exp b/gcc/testsuite/gcc.misc-tests/matrix1.exp index d825eba802d..96b5bcaeb02 100644 --- a/gcc/testsuite/gcc.misc-tests/matrix1.exp +++ b/gcc/testsuite/gcc.misc-tests/matrix1.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2007 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.misc-tests/mg-2.exp b/gcc/testsuite/gcc.misc-tests/mg-2.exp index cfeeb83464b..776d829f9e9 100644 --- a/gcc/testsuite/gcc.misc-tests/mg-2.exp +++ b/gcc/testsuite/gcc.misc-tests/mg-2.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2007 Free Software Foundation, Inc. +# Copyright (C) 2005-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.misc-tests/mg.exp b/gcc/testsuite/gcc.misc-tests/mg.exp index 7ba3ae1c653..789a1088ae5 100644 --- a/gcc/testsuite/gcc.misc-tests/mg.exp +++ b/gcc/testsuite/gcc.misc-tests/mg.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2007 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.misc-tests/options.exp b/gcc/testsuite/gcc.misc-tests/options.exp index a9a74e19afa..e255e16a548 100644 --- a/gcc/testsuite/gcc.misc-tests/options.exp +++ b/gcc/testsuite/gcc.misc-tests/options.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2007 Free Software Foundation, Inc. +# Copyright (C) 2005-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.misc-tests/sieve.exp b/gcc/testsuite/gcc.misc-tests/sieve.exp index 3f82ca91b59..c473e7d42fd 100644 --- a/gcc/testsuite/gcc.misc-tests/sieve.exp +++ b/gcc/testsuite/gcc.misc-tests/sieve.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2007 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.misc-tests/sort2.exp b/gcc/testsuite/gcc.misc-tests/sort2.exp index d89be7af77a..b8e461fbbb5 100644 --- a/gcc/testsuite/gcc.misc-tests/sort2.exp +++ b/gcc/testsuite/gcc.misc-tests/sort2.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2007 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/aapcs64.exp b/gcc/testsuite/gcc.target/aarch64/aapcs64/aapcs64.exp index 2ec7d3f4b15..b069c0a4554 100644 --- a/gcc/testsuite/gcc.target/aarch64/aapcs64/aapcs64.exp +++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/aapcs64.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # Contributed by ARM Ltd. # # This file is part of GCC. diff --git a/gcc/testsuite/gcc.target/aarch64/aarch64.exp b/gcc/testsuite/gcc.target/aarch64/aarch64.exp index 60ebb499ac7..52031d414ff 100644 --- a/gcc/testsuite/gcc.target/aarch64/aarch64.exp +++ b/gcc/testsuite/gcc.target/aarch64/aarch64.exp @@ -1,5 +1,5 @@ # Specific regression driver for AArch64. -# Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # Contributed by ARM Ltd. # # This file is part of GCC. diff --git a/gcc/testsuite/gcc.target/aarch64/fmovd-zero.c b/gcc/testsuite/gcc.target/aarch64/fmovd-zero.c new file mode 100644 index 00000000000..7e4590afe61 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/fmovd-zero.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +void +foo (double *output) +{ + *output = 0.0; +} + +/* { dg-final { scan-assembler "fmov\\td\[0-9\]+, xzr" } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/fmovd.c b/gcc/testsuite/gcc.target/aarch64/fmovd.c new file mode 100644 index 00000000000..c50e74e3f13 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/fmovd.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +void +foo (double *output) +{ + *output = 4.25; +} + +/* { dg-final { scan-assembler "fmov\\td\[0-9\]+, 4\\.25" } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/fmovf-zero.c b/gcc/testsuite/gcc.target/aarch64/fmovf-zero.c new file mode 100644 index 00000000000..5050ac31038 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/fmovf-zero.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +void +foo (float *output) +{ + *output = 0.0; +} + +/* { dg-final { scan-assembler "fmov\\ts\[0-9\]+, wzr" } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/fmovf.c b/gcc/testsuite/gcc.target/aarch64/fmovf.c new file mode 100644 index 00000000000..0a9e21517da --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/fmovf.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +void +foo (float *output) +{ + *output = 4.25; +} + +/* { dg-final { scan-assembler "fmov\\ts\[0-9\]+, 4\\.25" } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/vect-fcm-eq-d.c b/gcc/testsuite/gcc.target/aarch64/vect-fcm-eq-d.c new file mode 100644 index 00000000000..a177d28fedb --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/vect-fcm-eq-d.c @@ -0,0 +1,14 @@ +/* { dg-do run } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-all -fno-unroll-loops --save-temps -fno-inline" } */ + +#define FTYPE double +#define OP == +#define INV_OP != + +#include "vect-fcm.x" + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 3 "vect" } } */ +/* { dg-final { scan-assembler-times "fcmeq\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, v\[0-9\]+\.2d" 2 } } */ +/* { dg-final { scan-assembler-times "fcmeq\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, 0" 1 } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ +/* { dg-final { cleanup-saved-temps } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/vect-fcm-eq-f.c b/gcc/testsuite/gcc.target/aarch64/vect-fcm-eq-f.c new file mode 100644 index 00000000000..01f388075d3 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/vect-fcm-eq-f.c @@ -0,0 +1,14 @@ +/* { dg-do run } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-all -fno-unroll-loops --save-temps -fno-inline" } */ + +#define FTYPE float +#define OP == +#define INV_OP != + +#include "vect-fcm.x" + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 3 "vect" } } */ +/* { dg-final { scan-assembler-times "fcmeq\\tv\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s" 2 } } */ +/* { dg-final { scan-assembler-times "fcmeq\\tv\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s, 0" 1 } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ +/* { dg-final { cleanup-saved-temps } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/vect-fcm-ge-d.c b/gcc/testsuite/gcc.target/aarch64/vect-fcm-ge-d.c new file mode 100644 index 00000000000..6027593a8d4 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/vect-fcm-ge-d.c @@ -0,0 +1,14 @@ +/* { dg-do run } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-all -fno-unroll-loops --save-temps -fno-inline" } */ + +#define FTYPE double +#define OP >= +#define INV_OP < + +#include "vect-fcm.x" + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 3 "vect" } } */ +/* { dg-final { scan-assembler-times "fcmge\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, v\[0-9\]+\.2d" 2 } } */ +/* { dg-final { scan-assembler-times "fcmge\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, 0" 1 } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ +/* { dg-final { cleanup-saved-temps } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/vect-fcm-ge-f.c b/gcc/testsuite/gcc.target/aarch64/vect-fcm-ge-f.c new file mode 100644 index 00000000000..0337d70359c --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/vect-fcm-ge-f.c @@ -0,0 +1,14 @@ +/* { dg-do run } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-all -fno-unroll-loops --save-temps -fno-inline" } */ + +#define FTYPE float +#define OP >= +#define INV_OP < + +#include "vect-fcm.x" + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 3 "vect" } } */ +/* { dg-final { scan-assembler-times "fcmge\\tv\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s" 2 } } */ +/* { dg-final { scan-assembler-times "fcmge\\tv\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s, 0" 1 } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ +/* { dg-final { cleanup-saved-temps } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/vect-fcm-gt-d.c b/gcc/testsuite/gcc.target/aarch64/vect-fcm-gt-d.c new file mode 100644 index 00000000000..b812a39196d --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/vect-fcm-gt-d.c @@ -0,0 +1,14 @@ +/* { dg-do run } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-all -fno-unroll-loops --save-temps -fno-inline" } */ + +#define FTYPE double +#define OP > +#define INV_OP <= + +#include "vect-fcm.x" + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 3 "vect" } } */ +/* { dg-final { scan-assembler-times "fcmgt\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, v\[0-9\]+\.2d" 2 } } */ +/* { dg-final { scan-assembler-times "fcmgt\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, 0" 1 } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ +/* { dg-final { cleanup-saved-temps } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/vect-fcm-gt-f.c b/gcc/testsuite/gcc.target/aarch64/vect-fcm-gt-f.c new file mode 100644 index 00000000000..5e012a4f4c9 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/vect-fcm-gt-f.c @@ -0,0 +1,14 @@ +/* { dg-do run } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-all -fno-unroll-loops --save-temps -fno-inline" } */ + +#define FTYPE float +#define OP > +#define INV_OP <= + +#include "vect-fcm.x" + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 3 "vect" } } */ +/* { dg-final { scan-assembler-times "fcmgt\\tv\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s" 2 } } */ +/* { dg-final { scan-assembler-times "fcmgt\\tv\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s, 0" 1 } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ +/* { dg-final { cleanup-saved-temps } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/vect-fcm.x b/gcc/testsuite/gcc.target/aarch64/vect-fcm.x new file mode 100644 index 00000000000..7e51bef0ce2 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/vect-fcm.x @@ -0,0 +1,56 @@ +#include <stdlib.h> +#define N 16 + +FTYPE input1[N] = +{2.0, 4.0, 8.0, 16.0, + 2.125, 4.25, 8.5, 17.0, + -2.0, -4.0, -8.0, -16.0, + -2.125, -4.25, -8.5, -17.0}; + +FTYPE input2[N] = +{-2.0, 4.0, -8.0, 16.0, + 2.125, -4.25, 8.5, -17.0, + 2.0, -4.0, 8.0, -16.0, + -2.125, 4.25, -8.5, 17.0}; + +void +foo (FTYPE *in1, FTYPE *in2, FTYPE *output) +{ + int i = 0; + /* Vectorizable. */ + for (i = 0; i < N; i++) + output[i] = (in1[i] OP in2[i]) ? 2.0 : 4.0; +} + +void +bar (FTYPE *in1, FTYPE *in2, FTYPE *output) +{ + int i = 0; + /* Vectorizable. */ + for (i = 0; i < N; i++) + output[i] = (in1[i] INV_OP in2[i]) ? 4.0 : 2.0; +} + +void +foobar (FTYPE *in1, FTYPE *in2, FTYPE *output) +{ + int i = 0; + /* Vectorizable. */ + for (i = 0; i < N; i++) + output[i] = (in1[i] OP 0.0) ? 4.0 : 2.0; +} + +int +main (int argc, char **argv) +{ + FTYPE out1[N]; + FTYPE out2[N]; + int i = 0; + foo (input1, input2, out1); + bar (input1, input2, out2); + for (i = 0; i < N; i++) + if (out1[i] != out2[i]) + abort (); + return 0; +} + diff --git a/gcc/testsuite/gcc.target/aarch64/vect-fmovd-zero.c b/gcc/testsuite/gcc.target/aarch64/vect-fmovd-zero.c new file mode 100644 index 00000000000..667d22745e2 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/vect-fmovd-zero.c @@ -0,0 +1,17 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-all" } */ + +#define N 32 + +void +foo (double *output) +{ + int i = 0; + /* Vectorizable. */ + for (i = 0; i < N; i++) + output[i] = 0.0; +} + +/* { dg-final { scan-assembler "movi\\tv\[0-9\]+\\.2d, 0" } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/vect-fmovd.c b/gcc/testsuite/gcc.target/aarch64/vect-fmovd.c new file mode 100644 index 00000000000..a0211c71582 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/vect-fmovd.c @@ -0,0 +1,17 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-all" } */ + +#define N 32 + +void +foo (double *output) +{ + int i = 0; + /* Vectorizable. */ + for (i = 0; i < N; i++) + output[i] = 4.25; +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ +/* { dg-final { scan-assembler "fmov\\tv\[0-9\]+\\.2d, 4\\.25" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/vect-fmovf-zero.c b/gcc/testsuite/gcc.target/aarch64/vect-fmovf-zero.c new file mode 100644 index 00000000000..259a9d41f52 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/vect-fmovf-zero.c @@ -0,0 +1,17 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-all" } */ + +#define N 32 + +void +foo (float *output) +{ + int i = 0; + /* Vectorizable. */ + for (i = 0; i < N; i++) + output[i] = 0.0; +} + +/* { dg-final { scan-assembler "movi\\tv\[0-9\]+\\.\[24\]s, 0" } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/vect-fmovf.c b/gcc/testsuite/gcc.target/aarch64/vect-fmovf.c new file mode 100644 index 00000000000..0bd21dc190b --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/vect-fmovf.c @@ -0,0 +1,17 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-all" } */ + +#define N 32 + +void +foo (float *output) +{ + int i = 0; + /* Vectorizable. */ + for (i = 0; i < N; i++) + output[i] = 4.25; +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ +/* { dg-final { scan-assembler "fmov\\tv\[0-9\]+\\.\[24\]s, 4\\.25" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/vect-mull-compile.c b/gcc/testsuite/gcc.target/aarch64/vect-mull-compile.c index e51eaee5429..e90c97ff326 100644 --- a/gcc/testsuite/gcc.target/aarch64/vect-mull-compile.c +++ b/gcc/testsuite/gcc.target/aarch64/vect-mull-compile.c @@ -10,7 +10,15 @@ DEF_MULL2 (DEF_MULLB) DEF_MULL2 (DEF_MULLH) DEF_MULL2 (DEF_MULLS) -/* { dg-final { scan-assembler-times "smull v" 3 } } */ -/* { dg-final { scan-assembler-times "smull2 v" 3 } } */ -/* { dg-final { scan-assembler-times "umull v" 3 } } */ -/* { dg-final { scan-assembler-times "umull2 v" 3 } } */ +/* { dg-final { scan-assembler "smull\\tv\[0-9\]+\.8h"} } */ +/* { dg-final { scan-assembler "smull\\tv\[0-9\]+\.4s"} } */ +/* { dg-final { scan-assembler "smull\\tv\[0-9\]+\.2d"} } */ +/* { dg-final { scan-assembler "umull\\tv\[0-9\]+\.8h"} } */ +/* { dg-final { scan-assembler "umull\\tv\[0-9\]+\.4s"} } */ +/* { dg-final { scan-assembler "umull\\tv\[0-9\]+\.2d"} } */ +/* { dg-final { scan-assembler "smull2\\tv\[0-9\]+\.8h"} } */ +/* { dg-final { scan-assembler "smull2\\tv\[0-9\]+\.4s"} } */ +/* { dg-final { scan-assembler "smull2\\tv\[0-9\]+\.2d"} } */ +/* { dg-final { scan-assembler "umull2\\tv\[0-9\]+\.8h"} } */ +/* { dg-final { scan-assembler "umull2\\tv\[0-9\]+\.4s"} } */ +/* { dg-final { scan-assembler "umull2\\tv\[0-9\]+\.2d"} } */ diff --git a/gcc/testsuite/gcc.target/aarch64/vsqrt.c b/gcc/testsuite/gcc.target/aarch64/vsqrt.c index b59535a9b5f..5b777b236da 100644 --- a/gcc/testsuite/gcc.target/aarch64/vsqrt.c +++ b/gcc/testsuite/gcc.target/aarch64/vsqrt.c @@ -11,9 +11,11 @@ extern void abort (void); void test_square_root_v2sf () { - float32x2_t val = {4.0f, 9.0f}; + const float32_t pool[] = {4.0f, 9.0f}; + float32x2_t val; float32x2_t res; + val = vld1_f32 (pool); res = vsqrt_f32 (val); if (vget_lane_f32 (res, 0) != 2.0f) @@ -25,9 +27,11 @@ test_square_root_v2sf () void test_square_root_v4sf () { - float32x4_t val = {4.0f, 9.0f, 16.0f, 25.0f}; + const float32_t pool[] = {4.0f, 9.0f, 16.0f, 25.0f}; + float32x4_t val; float32x4_t res; + val = vld1q_f32 (pool); res = vsqrtq_f32 (val); if (vgetq_lane_f32 (res, 0) != 2.0f) @@ -43,9 +47,11 @@ test_square_root_v4sf () void test_square_root_v2df () { - float64x2_t val = {4.0, 9.0}; + const float64_t pool[] = {4.0, 9.0}; + float64x2_t val; float64x2_t res; + val = vld1q_f64 (pool); res = vsqrtq_f64 (val); if (vgetq_lane_f64 (res, 0) != 2.0) diff --git a/gcc/testsuite/gcc.target/alpha/alpha.exp b/gcc/testsuite/gcc.target/alpha/alpha.exp index edd8d68c1eb..dcbc23c4135 100644 --- a/gcc/testsuite/gcc.target/alpha/alpha.exp +++ b/gcc/testsuite/gcc.target/alpha/alpha.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2007 Free Software Foundation, Inc. +# Copyright (C) 2005-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/arm/aapcs/aapcs.exp b/gcc/testsuite/gcc.target/arm/aapcs/aapcs.exp index fcc4333464c..4c04b301cc2 100644 --- a/gcc/testsuite/gcc.target/arm/aapcs/aapcs.exp +++ b/gcc/testsuite/gcc.target/arm/aapcs/aapcs.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2004, 2006, 2007 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/arm/arm.exp b/gcc/testsuite/gcc.target/arm/arm.exp index ea135b201ac..fa7ce036253 100644 --- a/gcc/testsuite/gcc.target/arm/arm.exp +++ b/gcc/testsuite/gcc.target/arm/arm.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2004, 2006, 2007, 2012 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/arm/neon/neon.exp b/gcc/testsuite/gcc.target/arm/neon/neon.exp index fcc4333464c..4c04b301cc2 100644 --- a/gcc/testsuite/gcc.target/arm/neon/neon.exp +++ b/gcc/testsuite/gcc.target/arm/neon/neon.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2004, 2006, 2007 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/avr/avr.exp b/gcc/testsuite/gcc.target/avr/avr.exp index ecd80f5aa9a..5bd182e652b 100644 --- a/gcc/testsuite/gcc.target/avr/avr.exp +++ b/gcc/testsuite/gcc.target/avr/avr.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2008, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2008-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.target/avr/torture/avr-torture.exp b/gcc/testsuite/gcc.target/avr/torture/avr-torture.exp index 5a658d103fb..c9329879d58 100644 --- a/gcc/testsuite/gcc.target/avr/torture/avr-torture.exp +++ b/gcc/testsuite/gcc.target/avr/torture/avr-torture.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2008, 2011, 2012 Free Software Foundation, Inc. +# Copyright (C) 2008-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/bfin/bfin.exp b/gcc/testsuite/gcc.target/bfin/bfin.exp index 85a50a5ba4a..919c66b83c7 100644 --- a/gcc/testsuite/gcc.target/bfin/bfin.exp +++ b/gcc/testsuite/gcc.target/bfin/bfin.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2007, 2010 Free Software Foundation, Inc. +# Copyright (C) 2007-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/bfin/builtins/bfin-builtins.exp b/gcc/testsuite/gcc.target/bfin/builtins/bfin-builtins.exp index fdb4ffe15a8..e12ac909cab 100644 --- a/gcc/testsuite/gcc.target/bfin/builtins/bfin-builtins.exp +++ b/gcc/testsuite/gcc.target/bfin/builtins/bfin-builtins.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2009, 2011 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/cris/cris.exp b/gcc/testsuite/gcc.target/cris/cris.exp index 769052a2852..deb57d14ff2 100644 --- a/gcc/testsuite/gcc.target/cris/cris.exp +++ b/gcc/testsuite/gcc.target/cris/cris.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2007 Free Software Foundation, Inc. +# Copyright (C) 2005-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/cris/torture/cris-torture.exp b/gcc/testsuite/gcc.target/cris/torture/cris-torture.exp index a0b294fcde8..4eec2eb829e 100644 --- a/gcc/testsuite/gcc.target/cris/torture/cris-torture.exp +++ b/gcc/testsuite/gcc.target/cris/torture/cris-torture.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2007 Free Software Foundation, Inc. +# Copyright (C) 2005-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/epiphany/epiphany.exp b/gcc/testsuite/gcc.target/epiphany/epiphany.exp index dc9fecc728e..b2e4295c4b7 100644 --- a/gcc/testsuite/gcc.target/epiphany/epiphany.exp +++ b/gcc/testsuite/gcc.target/epiphany/epiphany.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2007, 2011 Free Software Foundation, Inc. +# Copyright (C) 2007-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/frv/frv.exp b/gcc/testsuite/gcc.target/frv/frv.exp index 82b2541cdf0..5410b72ea92 100644 --- a/gcc/testsuite/gcc.target/frv/frv.exp +++ b/gcc/testsuite/gcc.target/frv/frv.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2004 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 Free Software Foundation, Inc. # # This file is part of GCC. # diff --git a/gcc/testsuite/gcc.target/i386/i386.exp b/gcc/testsuite/gcc.target/i386/i386.exp index 37f43a60f05..15f744cf2de 100644 --- a/gcc/testsuite/gcc.target/i386/i386.exp +++ b/gcc/testsuite/gcc.target/i386/i386.exp @@ -1,5 +1,4 @@ -# Copyright (C) 1997, 2004, 2007, 2008, 2009, 2010, 2011, 2012 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp b/gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp index 2b1d63de17a..bea35516c73 100644 --- a/gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp +++ b/gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. +# Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file is part of GCC. # diff --git a/gcc/testsuite/gcc.target/i386/pr55672.c b/gcc/testsuite/gcc.target/i386/pr55672.c new file mode 100644 index 00000000000..6f1c898c748 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr55672.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fstack-check=generic" } */ + +int main () +{ + int x[8]; + if (x[0] != 4) + __builtin_abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.target/i386/pr55829.c b/gcc/testsuite/gcc.target/i386/pr55829.c new file mode 100644 index 00000000000..be70ba2f24f --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr55829.c @@ -0,0 +1,34 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -msse3 -fno-expensive-optimizations" } */ + +typedef double __m128d __attribute__ ((__vector_size__ (16))); + +extern double p1[]; +extern double p2[]; +extern double ck[]; +extern int n; + +__attribute__((__noinline__, __noclone__)) int chk_pd (double *v1, double *v2) +{ + return v2[n] != v1[n]; +} + +static inline void sse3_test_movddup_reg_subsume_ldsd (double *i1, double *r) +{ + __m128d t1 = (__m128d){*i1, 0}; + __m128d t2 = __builtin_ia32_shufpd (t1, t1, 0); + __builtin_ia32_storeupd (r, t2); +} + +int sse3_test (void) +{ + int i = 0; + int fail = 0; + for (; i < 80; i += 1) + { + ck[0] = p1[0]; + fail += chk_pd (ck, p2); + sse3_test_movddup_reg_subsume_ldsd (p1, p2); + } + return fail; +} diff --git a/gcc/testsuite/gcc.target/i386/pr55845.c b/gcc/testsuite/gcc.target/i386/pr55845.c new file mode 100644 index 00000000000..daf04e54a72 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr55845.c @@ -0,0 +1,40 @@ +/* { dg-do run } */ +/* { dg-require-effective-target avx } */ +/* { dg-options "-O3 -ffast-math -fschedule-insns -mavx -mvzeroupper" } */ + +#include "avx-check.h" + +#define N 100 + +double +__attribute__((noinline)) +foo (int size, double *y, double *x) +{ + double sum = 0.0; + int i; + + for (i = 0; i < size; i++) + sum += y[i] * x[i]; + + return sum; +} + +static void +__attribute__ ((noinline)) +avx_test () +{ + double x[N], y[N]; + double s; + int i; + + for (i = 0; i < N; i++) + { + x[i] = i; + y[i] = i; + } + + s = foo (N, y, x); + + if (s != 328350.0) + abort (); +} diff --git a/gcc/testsuite/gcc.target/i386/stackalign/stackalign.exp b/gcc/testsuite/gcc.target/i386/stackalign/stackalign.exp index 463ba612e0f..db7a49427b5 100644 --- a/gcc/testsuite/gcc.target/i386/stackalign/stackalign.exp +++ b/gcc/testsuite/gcc.target/i386/stackalign/stackalign.exp @@ -1,5 +1,4 @@ -# Copyright (C) 2008 -# Free Software Foundation, Inc. +# Copyright (C) 2008-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/ia64/ia64.exp b/gcc/testsuite/gcc.target/ia64/ia64.exp index 2d917fa9a06..329fcac59aa 100644 --- a/gcc/testsuite/gcc.target/ia64/ia64.exp +++ b/gcc/testsuite/gcc.target/ia64/ia64.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2007, 2007 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/m68k/m68k.exp b/gcc/testsuite/gcc.target/m68k/m68k.exp index 4ac6264409e..2ba17b9622e 100644 --- a/gcc/testsuite/gcc.target/m68k/m68k.exp +++ b/gcc/testsuite/gcc.target/m68k/m68k.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2004, 2006, 2007 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/microblaze/microblaze.exp b/gcc/testsuite/gcc.target/microblaze/microblaze.exp index a8994e91f1c..621200f20a9 100644 --- a/gcc/testsuite/gcc.target/microblaze/microblaze.exp +++ b/gcc/testsuite/gcc.target/microblaze/microblaze.exp @@ -1,4 +1,4 @@ -# Copyright 2009, 2010 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/mips/inter/mips16-inter.exp b/gcc/testsuite/gcc.target/mips/inter/mips16-inter.exp index e6ed6b9bcb9..54631ad4c7f 100644 --- a/gcc/testsuite/gcc.target/mips/inter/mips16-inter.exp +++ b/gcc/testsuite/gcc.target/mips/inter/mips16-inter.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2007 Free Software Foundation, Inc. +# Copyright (C) 2007-2013 Free Software Foundation, Inc. # # This file is part of GCC. # diff --git a/gcc/testsuite/gcc.target/mips/mips-nonpic/README b/gcc/testsuite/gcc.target/mips/mips-nonpic/README index 1b42becbedf..ddffaa59f0d 100644 --- a/gcc/testsuite/gcc.target/mips/mips-nonpic/README +++ b/gcc/testsuite/gcc.target/mips/mips-nonpic/README @@ -20,7 +20,7 @@ main-15.c address and call address taken only Neither (* But creating a PLT entr main-16.c address and call address and call PLT entry -Copyright (C) 2008 Free Software Foundation, Inc. +Copyright (C) 2008-2013 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff --git a/gcc/testsuite/gcc.target/mips/mips-nonpic/mips-nonpic.exp b/gcc/testsuite/gcc.target/mips/mips-nonpic/mips-nonpic.exp index 47443acda58..27c9f1d10cc 100644 --- a/gcc/testsuite/gcc.target/mips/mips-nonpic/mips-nonpic.exp +++ b/gcc/testsuite/gcc.target/mips/mips-nonpic/mips-nonpic.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2008 Free Software Foundation, Inc. +# Copyright (C) 2008-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/mips/mips.exp b/gcc/testsuite/gcc.target/mips/mips.exp index 88487ab9ef5..ad32fb67713 100644 --- a/gcc/testsuite/gcc.target/mips/mips.exp +++ b/gcc/testsuite/gcc.target/mips/mips.exp @@ -1,5 +1,4 @@ -# Copyright (C) 1997, 2007, 2008, 2009, 2010, 2011, 2012 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/powerpc/powerpc.exp b/gcc/testsuite/gcc.target/powerpc/powerpc.exp index c59e4c3ef4d..355a397e408 100644 --- a/gcc/testsuite/gcc.target/powerpc/powerpc.exp +++ b/gcc/testsuite/gcc.target/powerpc/powerpc.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2007, 2012 Free Software Foundation, Inc. +# Copyright (C) 2005-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/powerpc/ppc-mov-1.c b/gcc/testsuite/gcc.target/powerpc/ppc-mov-1.c index 750cf85f08d..3a79f935471 100644 --- a/gcc/testsuite/gcc.target/powerpc/ppc-mov-1.c +++ b/gcc/testsuite/gcc.target/powerpc/ppc-mov-1.c @@ -1,7 +1,7 @@ /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */ /* { dg-options "-O2" } */ -/* { dg-final { scan-assembler-not "fmr \[0-9\]+,\[0-9\]+" } } +/* { dg-final { scan-assembler-not "lfd \(f?\[0-9\]+\),\[^\n\r\]*\[\n\r\]+\[ \t]*fmr f?1,\\1\[\n\r\]+\[ \t]*blr" } } */ /* Origin:Pete Steinmetz <steinmtz@us.ibm.com> */ diff --git a/gcc/testsuite/gcc.target/rx/rx.exp b/gcc/testsuite/gcc.target/rx/rx.exp index aa516e4555d..9eaf2b86613 100644 --- a/gcc/testsuite/gcc.target/rx/rx.exp +++ b/gcc/testsuite/gcc.target/rx/rx.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2008 Free Software Foundation, Inc. +# Copyright (C) 2008-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/s390/pr55718.c b/gcc/testsuite/gcc.target/s390/pr55718.c new file mode 100644 index 00000000000..a82d435229b --- /dev/null +++ b/gcc/testsuite/gcc.target/s390/pr55718.c @@ -0,0 +1,29 @@ +/* PR target/55717 */ + +/* { dg-do compile } */ +/* { dg-options "-O2 -march=z10 -fPIC" } */ + +extern char temp[]; +short ansi_value[256]; +void terminal_state(void) +{ + static const char *puc[] = { "", "<", "=", ">", "?", 0}; + int i, j, k, l, modes_found; + char buf[256]; + k = (int) __builtin_strlen(temp); + for (j = l = 0; j < 255 && j - l < 50; j++) + { + __builtin_sprintf(temp, "\033[%s%d$p", puc[i], j); + if (ansi_value[1]) + { + l = j; + buf[k] = '\0'; + put_crlf(); + ptextln(buf); + buf[k++] = ' '; + k = (int) __builtin_strlen(temp); + } + } + for (i = j = 0; j < modes_found; j = ++i >> 1) + ; +} diff --git a/gcc/testsuite/gcc.target/s390/s390.exp b/gcc/testsuite/gcc.target/s390/s390.exp index d693309861e..a4a6609cb01 100644 --- a/gcc/testsuite/gcc.target/s390/s390.exp +++ b/gcc/testsuite/gcc.target/s390/s390.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2007 Free Software Foundation, Inc. +# Copyright (C) 2007-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/sh/sh.exp b/gcc/testsuite/gcc.target/sh/sh.exp index 9389d4455b2..0ee70c27e1a 100644 --- a/gcc/testsuite/gcc.target/sh/sh.exp +++ b/gcc/testsuite/gcc.target/sh/sh.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2007 Free Software Foundation, Inc. +# Copyright (C) 2007-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/sh/torture/sh-torture.exp b/gcc/testsuite/gcc.target/sh/torture/sh-torture.exp index f025aa3ef24..6e3d0981fde 100644 --- a/gcc/testsuite/gcc.target/sh/torture/sh-torture.exp +++ b/gcc/testsuite/gcc.target/sh/torture/sh-torture.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2012 Free Software Foundation, Inc. +# Copyright (C) 2012-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/sparc/sparc.exp b/gcc/testsuite/gcc.target/sparc/sparc.exp index 4f865a7ee5f..6ec8b7fb22c 100644 --- a/gcc/testsuite/gcc.target/sparc/sparc.exp +++ b/gcc/testsuite/gcc.target/sparc/sparc.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2004, 2007, 2011 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/spu/ea/ea.exp b/gcc/testsuite/gcc.target/spu/ea/ea.exp index 8485d0fc720..69f796da9ce 100644 --- a/gcc/testsuite/gcc.target/spu/ea/ea.exp +++ b/gcc/testsuite/gcc.target/spu/ea/ea.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 2008-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/spu/spu.exp b/gcc/testsuite/gcc.target/spu/spu.exp index e0d76a7e517..bddd9ea6059 100644 --- a/gcc/testsuite/gcc.target/spu/spu.exp +++ b/gcc/testsuite/gcc.target/spu/spu.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2007 Free Software Foundation, Inc. +# Copyright (C) 2005-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/tic6x/builtins/c6x-builtins.exp b/gcc/testsuite/gcc.target/tic6x/builtins/c6x-builtins.exp index f0e5fd6188d..d005a1db194 100644 --- a/gcc/testsuite/gcc.target/tic6x/builtins/c6x-builtins.exp +++ b/gcc/testsuite/gcc.target/tic6x/builtins/c6x-builtins.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2009, 2011 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/tic6x/tic6x.exp b/gcc/testsuite/gcc.target/tic6x/tic6x.exp index e9037283d84..60245e3a00a 100644 --- a/gcc/testsuite/gcc.target/tic6x/tic6x.exp +++ b/gcc/testsuite/gcc.target/tic6x/tic6x.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2010, 2011 Free Software Foundation, Inc. +# Copyright (C) 2010-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/x86_64/abi/README.gcc b/gcc/testsuite/gcc.target/x86_64/abi/README.gcc index 7db8d4157af..b3116a3cd46 100644 --- a/gcc/testsuite/gcc.target/x86_64/abi/README.gcc +++ b/gcc/testsuite/gcc.target/x86_64/abi/README.gcc @@ -18,7 +18,7 @@ The current maintainer is: matz@suse.de -Copyright (C) 2005 Free Software Foundation, Inc. +Copyright (C) 2005-2013 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff --git a/gcc/testsuite/gcc.target/x86_64/abi/abi-x86_64.exp b/gcc/testsuite/gcc.target/x86_64/abi/abi-x86_64.exp index 521bd53ee92..2a6fcf06071 100644 --- a/gcc/testsuite/gcc.target/x86_64/abi/abi-x86_64.exp +++ b/gcc/testsuite/gcc.target/x86_64/abi/abi-x86_64.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 2005-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/x86_64/abi/avx/abi-avx.exp b/gcc/testsuite/gcc.target/x86_64/abi/avx/abi-avx.exp index a509f2b083f..5d8a844cc58 100644 --- a/gcc/testsuite/gcc.target/x86_64/abi/avx/abi-avx.exp +++ b/gcc/testsuite/gcc.target/x86_64/abi/avx/abi-avx.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2009, 2010 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/x86_64/abi/callabi/callabi.exp b/gcc/testsuite/gcc.target/x86_64/abi/callabi/callabi.exp index 64c3b81fdbe..c13961ab78a 100644 --- a/gcc/testsuite/gcc.target/x86_64/abi/callabi/callabi.exp +++ b/gcc/testsuite/gcc.target/x86_64/abi/callabi/callabi.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2009, 2011 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.target/xstormy16/xstormy16.exp b/gcc/testsuite/gcc.target/xstormy16/xstormy16.exp index 2c61cf28091..6d09fb705c4 100644 --- a/gcc/testsuite/gcc.target/xstormy16/xstormy16.exp +++ b/gcc/testsuite/gcc.target/xstormy16/xstormy16.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 Free Software Foundation, Inc. # # This file is part of GCC. # diff --git a/gcc/testsuite/gcc.test-framework/README b/gcc/testsuite/gcc.test-framework/README index 4055b53be41..fa649d538a7 100644 --- a/gcc/testsuite/gcc.test-framework/README +++ b/gcc/testsuite/gcc.test-framework/README @@ -25,7 +25,7 @@ The awk script prints unexpected results followed by the number of tests that passed and failed. -Copyright (C) 2005, 2007 Free Software Foundation, Inc. +Copyright (C) 2005-2013 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff --git a/gcc/testsuite/gcc.test-framework/gen_directive_tests b/gcc/testsuite/gcc.test-framework/gen_directive_tests index 6aa63ad6f69..84095f3ae8b 100755 --- a/gcc/testsuite/gcc.test-framework/gen_directive_tests +++ b/gcc/testsuite/gcc.test-framework/gen_directive_tests @@ -14,7 +14,7 @@ # This script has evolved and could be rewritten to be more compact. # # -# Copyright (c) 2004, 2005, 2007 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.test-framework/test-framework.awk b/gcc/testsuite/gcc.test-framework/test-framework.awk index ccede06b5f1..0cf29ff2cbc 100644 --- a/gcc/testsuite/gcc.test-framework/test-framework.awk +++ b/gcc/testsuite/gcc.test-framework/test-framework.awk @@ -3,8 +3,7 @@ # of passing tests. # # -# Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. +# Copyright (C) 2004-2013 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gcc.test-framework/test-framework.exp b/gcc/testsuite/gcc.test-framework/test-framework.exp index c669f0ad1ce..b01e8044801 100644 --- a/gcc/testsuite/gcc.test-framework/test-framework.exp +++ b/gcc/testsuite/gcc.test-framework/test-framework.exp @@ -1,5 +1,4 @@ -# Copyright (c) 2002, 2003, 2004, 2005, 2007, 2009 -# Free Software Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gfortran.dg/bind_c_bool_1.f90 b/gcc/testsuite/gfortran.dg/bind_c_bool_1.f90 new file mode 100644 index 00000000000..467bdc1b28a --- /dev/null +++ b/gcc/testsuite/gfortran.dg/bind_c_bool_1.f90 @@ -0,0 +1,25 @@ +! { dg-do compile } +! { dg-options "-std=f2003" } +! +! PR fortran/55758 +! + +function sub2() bind(C) ! { dg-error "GNU Extension: LOGICAL result variable 'sub2' at .1. with non-C_Bool kind in BIND.C. procedure 'sub2'" } + logical(kind=8) :: sub2 + logical(kind=4) :: local ! OK +end function sub2 + +function sub4() bind(C) result(res) ! { dg-error "GNU Extension: LOGICAL result variable 'res' at .1. with non-C_Bool kind in BIND.C. procedure 'sub4'" } + logical(kind=2) :: res + logical(kind=4) :: local ! OK +end function sub4 + + +subroutine sub(x) bind(C) ! { dg-error "GNU Extension: LOGICAL dummy argument 'x' at .1. with non-C_Bool kind in BIND.C. procedure 'sub'" } + logical(kind=4) :: x +end subroutine sub + +subroutine sub3(y) bind(C) + use iso_c_binding, only : c_bool + logical(kind=c_bool) :: y ! OK +end subroutine sub3 diff --git a/gcc/testsuite/gfortran.dg/coarray/caf.exp b/gcc/testsuite/gfortran.dg/coarray/caf.exp index 52dff753160..61bb6c1ab95 100644 --- a/gcc/testsuite/gfortran.dg/coarray/caf.exp +++ b/gcc/testsuite/gfortran.dg/coarray/caf.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2011 Free Software Foundation, Inc. +# Copyright (C) 2011-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gfortran.dg/debug/debug.exp b/gcc/testsuite/gfortran.dg/debug/debug.exp index 0e0b4b91d01..0d78414dc1b 100644 --- a/gcc/testsuite/gfortran.dg/debug/debug.exp +++ b/gcc/testsuite/gfortran.dg/debug/debug.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2008 Free Software Foundation, Inc. +# Copyright (C) 2008-2013 Free Software Foundation, Inc. # This file is part of GCC. # diff --git a/gcc/testsuite/gfortran.dg/dg.exp b/gcc/testsuite/gfortran.dg/dg.exp index ea042831539..795ac8ee6b8 100644 --- a/gcc/testsuite/gfortran.dg/dg.exp +++ b/gcc/testsuite/gfortran.dg/dg.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gfortran.dg/do_5.f90 b/gcc/testsuite/gfortran.dg/do_5.f90 index 08cd8e6644b..f7cec363e83 100644 --- a/gcc/testsuite/gfortran.dg/do_5.f90 +++ b/gcc/testsuite/gfortran.dg/do_5.f90 @@ -15,7 +15,7 @@ L = .FALSE. END FUNCTION - LOGICAL(8) FUNCTION L2() BIND(C) + LOGICAL(8) FUNCTION L2() BIND(C) ! { dg-warning "GNU Extension: LOGICAL result variable 'l2' at .1. with non-C_Bool kind in BIND.C. procedure 'l2'" } L2 = .FALSE._8 END FUNCTION diff --git a/gcc/testsuite/gfortran.dg/elemental_scalar_args_2.f90 b/gcc/testsuite/gfortran.dg/elemental_scalar_args_2.f90 new file mode 100644 index 00000000000..c2b5df8d18b --- /dev/null +++ b/gcc/testsuite/gfortran.dg/elemental_scalar_args_2.f90 @@ -0,0 +1,36 @@ +! { dg-do run } +! Test the fix for PR55618, in which character scalar function arguments to +! elemental functions would gain an extra indirect reference thus causing +! failures in Vst17.f95, Vst 30.f95 and Vst31.f95 in the iso_varying_string +! testsuite, where elemental tests are done. +! +! Reported by Tobias Burnus <burnus@gcc.gnu.org> +! + integer, dimension (2) :: i = [1,2] + integer :: j = 64 + character (len = 2) :: chr1 = "lm" + character (len = 1), dimension (2) :: chr2 = ["r", "s"] + if (any (foo (i, bar()) .ne. ["a", "b"])) call abort ! This would fail + if (any (foo (i, "xy") .ne. ["x", "y"])) call abort ! OK - not a function + if (any (foo (i, chr1) .ne. ["l", "m"])) call abort ! ditto + if (any (foo (i, char (j)) .ne. ["A", "B"])) call abort ! This would fail + if (any (foo (i, chr2) .ne. ["s", "u"])) call abort ! OK - not a scalar + if (any (foo (i, bar2()) .ne. ["e", "g"])) call abort ! OK - not a scalar function +contains + elemental character(len = 1) function foo (arg1, arg2) + integer, intent (in) :: arg1 + character(len = *), intent (in) :: arg2 + if (len (arg2) > 1) then + foo = arg2(arg1:arg1) + else + foo = char (ichar (arg2) + arg1) + end if + end function + character(len = 2) function bar () + bar = "ab" + end function + function bar2 () result(res) + character (len = 1), dimension(2) :: res + res = ["d", "e"] + end function +end diff --git a/gcc/testsuite/gfortran.dg/g77/README b/gcc/testsuite/gfortran.dg/g77/README index a790ca86f67..16fad09a8e4 100644 --- a/gcc/testsuite/gfortran.dg/g77/README +++ b/gcc/testsuite/gfortran.dg/g77/README @@ -201,7 +201,7 @@ check0.f Y select_no_compile.f Y -Copyright (C) 2004, 2005 Free Software Foundation, Inc. +Copyright (C) 2004-2013 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff --git a/gcc/testsuite/gfortran.dg/gomp/gomp.exp b/gcc/testsuite/gfortran.dg/gomp/gomp.exp index e12864b4f93..a8d32457319 100644 --- a/gcc/testsuite/gfortran.dg/gomp/gomp.exp +++ b/gcc/testsuite/gfortran.dg/gomp/gomp.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2005-2013 Free Software Foundation, Inc. # # This file is part of GCC. # diff --git a/gcc/testsuite/gfortran.dg/graphite/graphite.exp b/gcc/testsuite/gfortran.dg/graphite/graphite.exp index 8dfe0d3ff89..b6f7bc317e8 100644 --- a/gcc/testsuite/gfortran.dg/graphite/graphite.exp +++ b/gcc/testsuite/gfortran.dg/graphite/graphite.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2008, 2010, 2011 Free Software Foundation, Inc. +# Copyright (C) 2008-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gfortran.dg/intrinsic_size_3.f90 b/gcc/testsuite/gfortran.dg/intrinsic_size_3.f90 new file mode 100644 index 00000000000..5856509bf59 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/intrinsic_size_3.f90 @@ -0,0 +1,26 @@ +! { dg-do compile } +! { dg-options "-fdump-tree-original" } +! +! PR fortran/55852 +! +! Contributed by A. Kasahara +! +program bug + implicit none + + Real, allocatable:: a(:) + integer(2) :: iszs + + allocate(a(1:3)) + + iszs = ubound((a), 1)! Was ICEing +! print*, ubound((a), 1) ! Was ICEing +! print*, ubound(a, 1) ! OK +! print*, lbound((a), 1) ! OK +! print*, lbound(a, 1) ! OK + + stop +end program bug + +! { dg-final { scan-tree-dump-times "iszs = \\(integer\\(kind=2\\)\\) MAX_EXPR <\\(D.\[0-9\]+->dim.0..ubound - D.\[0-9\]+->dim.0..lbound\\) \\+ 1, 0>;" 1 "original" } } +! { dg-final { cleanup-tree-dump "original" } } diff --git a/gcc/testsuite/gfortran.dg/lto/lto.exp b/gcc/testsuite/gfortran.dg/lto/lto.exp index e211426db2d..d158461d026 100644 --- a/gcc/testsuite/gfortran.dg/lto/lto.exp +++ b/gcc/testsuite/gfortran.dg/lto/lto.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gfortran.dg/pointer_init_2.f90 b/gcc/testsuite/gfortran.dg/pointer_init_2.f90 index 8f72663e259..a280a3e4f98 100644 --- a/gcc/testsuite/gfortran.dg/pointer_init_2.f90 +++ b/gcc/testsuite/gfortran.dg/pointer_init_2.f90 @@ -24,13 +24,26 @@ subroutine sub type :: t integer, pointer :: dpc0 => 13 ! { dg-error "Error in pointer initialization" } - integer, pointer :: dpc1 => r ! { dg-error "is REAL but should be INTEGER" } - integer, pointer :: dpc2 => v ! { dg-error "rank of the element.*does not match" } - integer, pointer :: dpc3 => i ! { dg-error "should be a POINTER or a TARGET" } + end type t + + type t2 + integer, pointer :: dpc1 => r ! { dg-error "attempted assignment of REAL.4. to INTEGER.4." } + end type t2 + + type t3 + integer, pointer :: dpc2 => v ! { dg-error "Different ranks in pointer assignment" } + end type t3 + + type t4 + integer, pointer :: dpc3 => i ! { dg-error "Pointer assignment target is neither TARGET nor POINTER" } + end type t4 + + type t5 integer, pointer :: dpc4 => j ! { dg-error "must have the SAVE attribute" } - integer, pointer :: dpc5 => a ! { dg-error "must not be ALLOCATABLE" } - end type + end type t5 - type(t) ::u + type t6 + integer, pointer :: dpc5 => a ! { dg-error "must not be ALLOCATABLE" } + end type t6 end subroutine diff --git a/gcc/testsuite/gfortran.dg/pointer_init_7.f90 b/gcc/testsuite/gfortran.dg/pointer_init_7.f90 new file mode 100644 index 00000000000..dfde6156e66 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pointer_init_7.f90 @@ -0,0 +1,56 @@ +! { dg-do compile } +! +! PR fortran/55763 +! + +subroutine sub() + type t + integer :: i + end type t + + type(t), target :: tgt + type(t), target, save :: tgt2(2) + + type t2a + type(t), pointer :: cmp1 => tgt ! { dg-error "Pointer initialization target at .1. must have the SAVE attribute" } + end type t2a + + type t2b + class(t), pointer :: cmp2 => tgt ! { dg-error "Pointer initialization target at .1. must have the SAVE attribute" } + end type t2b + + type t2c + class(t), pointer :: cmp3 => tgt ! { dg-error "Pointer initialization target at .1. must have the SAVE attribute" } + end type t2c + + type t2d + integer, pointer :: cmp4 => tgt%i ! { dg-error "Pointer initialization target at .1. must have the SAVE attribute" } + end type t2d + + type(t), pointer :: w => tgt ! { dg-error "Pointer initialization target at .1. must have the SAVE attribute" } + class(t), pointer :: x => tgt ! { dg-error "Pointer initialization target at .1. must have the SAVE attribute" } + class(*), pointer :: y => tgt ! { dg-error "Pointer initialization target at .1. must have the SAVE attribute" } + integer, pointer :: z => tgt%i ! { dg-error "Pointer initialization target at .1. must have the SAVE attribute" } +end subroutine + +program main + type t3 + integer :: j + end type t3 + + type(t3), target :: tgt + + type t4 + type(t3), pointer :: cmp1 => tgt ! OK + class(t3), pointer :: cmp2 => tgt ! OK + class(t3), pointer :: cmp3 => tgt ! OK + integer, pointer :: cmp4 => tgt%j ! OK + end type t4 + + type(t3), target :: mytarget + + type(t3), pointer :: a => mytarget ! OK + class(t3), pointer :: b => mytarget ! OK + class(*), pointer :: c => mytarget ! OK + integer, pointer :: d => mytarget%j ! OK +end program main diff --git a/gcc/testsuite/gfortran.dg/select_type_32.f90 b/gcc/testsuite/gfortran.dg/select_type_32.f90 new file mode 100644 index 00000000000..5e366398acb --- /dev/null +++ b/gcc/testsuite/gfortran.dg/select_type_32.f90 @@ -0,0 +1,25 @@ +! { dg-do compile } +! +! PR fortran/55763 +! +! Contributed by Harald Anlauf +! + +module gfcbug122 + implicit none + type myobj + class(*), allocatable :: x + contains + procedure :: print + end type myobj +contains + subroutine print(this) + class(myobj) :: this + select type (this) + type is (integer) ! { dg-error "Unexpected intrinsic type 'INTEGER'" } + type is (real) ! { dg-error "Unexpected intrinsic type 'REAL'" } + type is (complex) ! { dg-error "Unexpected intrinsic type 'COMPLEX'" } + type is (character(len=*)) ! { dg-error "Unexpected intrinsic type 'CHARACTER'" } + end select + end subroutine print +end module gfcbug122 diff --git a/gcc/testsuite/gfortran.dg/use_28.f90 b/gcc/testsuite/gfortran.dg/use_28.f90 new file mode 100644 index 00000000000..4972bea4f7e --- /dev/null +++ b/gcc/testsuite/gfortran.dg/use_28.f90 @@ -0,0 +1,18 @@ +! { dg-do compile } +! +! PR fortran/47203 +! The USE statement of a module was not rejected in a procedure with the same +! name if the procedure was contained. +! +! Contributed by Tobias Burnus <burnus@net-b.de> + +module m +end module m + +call m +contains + subroutine m() + use m ! { dg-error "is also the name of the current program unit" } + end subroutine m +end + diff --git a/gcc/testsuite/gfortran.dg/vect/vect.exp b/gcc/testsuite/gfortran.dg/vect/vect.exp index caacc041967..daa81c87801 100644 --- a/gcc/testsuite/gfortran.dg/vect/vect.exp +++ b/gcc/testsuite/gfortran.dg/vect/vect.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2004, 2007, 2008, 2010 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gfortran.fortran-torture/compile/compile.exp b/gcc/testsuite/gfortran.fortran-torture/compile/compile.exp index 91e5f41bd15..df52b7b12f6 100644 --- a/gcc/testsuite/gfortran.fortran-torture/compile/compile.exp +++ b/gcc/testsuite/gfortran.fortran-torture/compile/compile.exp @@ -1,5 +1,5 @@ # Expect driver script for GCC Regression Tests -# Copyright (C) 2003, 2007, 2008, 2012 Free Software Foundation +# Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gfortran.fortran-torture/execute/execute.exp b/gcc/testsuite/gfortran.fortran-torture/execute/execute.exp index c2022f61c7f..507f76e78af 100644 --- a/gcc/testsuite/gfortran.fortran-torture/execute/execute.exp +++ b/gcc/testsuite/gfortran.fortran-torture/execute/execute.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2003, 2007, 2008, 2012 Free Software Foundation, Inc. +# Copyright (C) 2003-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gnat.dg/dg.exp b/gcc/testsuite/gnat.dg/dg.exp index a764c0b00b7..95fb4918de9 100644 --- a/gcc/testsuite/gnat.dg/dg.exp +++ b/gcc/testsuite/gnat.dg/dg.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007 Free Software Foundation, Inc. +# Copyright (C) 2006-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gnat.dg/specs/specs.exp b/gcc/testsuite/gnat.dg/specs/specs.exp index 91c5f6c4c0e..f23fe8a3147 100644 --- a/gcc/testsuite/gnat.dg/specs/specs.exp +++ b/gcc/testsuite/gnat.dg/specs/specs.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007 Free Software Foundation, Inc. +# Copyright (C) 2006-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/gnat.dg/style/style.exp b/gcc/testsuite/gnat.dg/style/style.exp index a764c0b00b7..95fb4918de9 100644 --- a/gcc/testsuite/gnat.dg/style/style.exp +++ b/gcc/testsuite/gnat.dg/style/style.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007 Free Software Foundation, Inc. +# Copyright (C) 2006-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/go.dg/dg.exp b/gcc/testsuite/go.dg/dg.exp index 62c8c064472..e30f4d001df 100644 --- a/gcc/testsuite/go.dg/dg.exp +++ b/gcc/testsuite/go.dg/dg.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/go.go-torture/execute/execute.exp b/gcc/testsuite/go.go-torture/execute/execute.exp index 350d7511426..ae828bb7fe0 100644 --- a/gcc/testsuite/go.go-torture/execute/execute.exp +++ b/gcc/testsuite/go.go-torture/execute/execute.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/go.test/go-test.exp b/gcc/testsuite/go.test/go-test.exp index 7451f396dcb..6f397343e0f 100644 --- a/gcc/testsuite/go.test/go-test.exp +++ b/gcc/testsuite/go.test/go-test.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # Written by Ian Lance Taylor <iant@google.com>. # This program is free software; you can redistribute it and/or modify diff --git a/gcc/testsuite/lib/asan-dg.exp b/gcc/testsuite/lib/asan-dg.exp index 90ff3572787..0bc9b245d79 100644 --- a/gcc/testsuite/lib/asan-dg.exp +++ b/gcc/testsuite/lib/asan-dg.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2012 Free Software Foundation, Inc. +# Copyright (C) 2012-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/c-compat.exp b/gcc/testsuite/lib/c-compat.exp index bb928c2969d..58eaf4d64ad 100644 --- a/gcc/testsuite/lib/c-compat.exp +++ b/gcc/testsuite/lib/c-compat.exp @@ -1,5 +1,4 @@ -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2013 -# Free Software Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/c-torture.exp b/gcc/testsuite/lib/c-torture.exp index dfbd5c0a3e5..ccfd6f12cd7 100644 --- a/gcc/testsuite/lib/c-torture.exp +++ b/gcc/testsuite/lib/c-torture.exp @@ -1,5 +1,4 @@ -# Copyright (C) 1992-1998, 1999, 2000, 2007, 2008, 2010 -# Free Software Foundation, Inc. +# Copyright (C) 1992-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/compat.exp b/gcc/testsuite/lib/compat.exp index d686631c03b..27b04a68065 100644 --- a/gcc/testsuite/lib/compat.exp +++ b/gcc/testsuite/lib/compat.exp @@ -1,5 +1,4 @@ -# Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2011 -# Free Software Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/copy-file.exp b/gcc/testsuite/lib/copy-file.exp index bceee76ed46..741af670f5b 100644 --- a/gcc/testsuite/lib/copy-file.exp +++ b/gcc/testsuite/lib/copy-file.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2003, 2007 Free Software Foundation, Inc. +# Copyright (C) 2003-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/dejapatches.exp b/gcc/testsuite/lib/dejapatches.exp index aa3bc2b613f..e9727c4ed0f 100644 --- a/gcc/testsuite/lib/dejapatches.exp +++ b/gcc/testsuite/lib/dejapatches.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2008 Free Software Foundation, Inc. +# Copyright (C) 2008-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/dg-pch.exp b/gcc/testsuite/lib/dg-pch.exp index b1fadabaaf8..d6a55d89e12 100644 --- a/gcc/testsuite/lib/dg-pch.exp +++ b/gcc/testsuite/lib/dg-pch.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2003, 2007, 2008, 2010 Free Software Foundation, Inc. +# Copyright (C) 2003-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/file-format.exp b/gcc/testsuite/lib/file-format.exp index 92437c4ef61..eb96b085c31 100644 --- a/gcc/testsuite/lib/file-format.exp +++ b/gcc/testsuite/lib/file-format.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1999, 2007 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/fortran-modules.exp b/gcc/testsuite/lib/fortran-modules.exp index ea3de71e137..77981f2fa41 100644 --- a/gcc/testsuite/lib/fortran-modules.exp +++ b/gcc/testsuite/lib/fortran-modules.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2012 Free Software Foundation, Inc. +# Copyright (C) 2012-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/fortran-torture.exp b/gcc/testsuite/lib/fortran-torture.exp index 9d875a00bb5..c359c90ff92 100644 --- a/gcc/testsuite/lib/fortran-torture.exp +++ b/gcc/testsuite/lib/fortran-torture.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2003, 2006, 2007, 2008, 2010 Free Software Foundation, Inc. +# Copyright (C) 2003-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/g++-dg.exp b/gcc/testsuite/lib/g++-dg.exp index e6ef74b5ef4..2f9225b5ae1 100644 --- a/gcc/testsuite/lib/g++-dg.exp +++ b/gcc/testsuite/lib/g++-dg.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 1999, 2000, 2003, 2007 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/g++.exp b/gcc/testsuite/lib/g++.exp index 7fd36dabe75..ec6c7150121 100644 --- a/gcc/testsuite/lib/g++.exp +++ b/gcc/testsuite/lib/g++.exp @@ -1,5 +1,4 @@ -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003, -# 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 1992-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/gcc-defs.exp b/gcc/testsuite/lib/gcc-defs.exp index 0dbb088314f..b2db164bc4b 100644 --- a/gcc/testsuite/lib/gcc-defs.exp +++ b/gcc/testsuite/lib/gcc-defs.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2001, 2003, 2004, 2007, 2010 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp index f2161ea6526..b4d50cd5c0a 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -1,5 +1,4 @@ -# Copyright (C) 1997, 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2008, 2009, -# 2010 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/gcc-gdb-test.exp b/gcc/testsuite/lib/gcc-gdb-test.exp index 6cd92061558..026830f110d 100644 --- a/gcc/testsuite/lib/gcc-gdb-test.exp +++ b/gcc/testsuite/lib/gcc-gdb-test.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2009, 2011 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/gcc-simulate-thread.exp b/gcc/testsuite/lib/gcc-simulate-thread.exp index 0b36947d512..4e5960df74c 100644 --- a/gcc/testsuite/lib/gcc-simulate-thread.exp +++ b/gcc/testsuite/lib/gcc-simulate-thread.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2011, 2012 Free Software Foundation, Inc. +# Copyright (C) 2011-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/gcc.exp b/gcc/testsuite/lib/gcc.exp index bb1763ad343..ea7782df2a0 100644 --- a/gcc/testsuite/lib/gcc.exp +++ b/gcc/testsuite/lib/gcc.exp @@ -1,5 +1,4 @@ -# Copyright (C) 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001, 2003, 2004, -# 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 1992-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/gcov.exp b/gcc/testsuite/lib/gcov.exp index 1cf93a718a6..07ff2a0c5aa 100644 --- a/gcc/testsuite/lib/gcov.exp +++ b/gcc/testsuite/lib/gcov.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 2001, 2007 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/gfortran-dg.exp b/gcc/testsuite/lib/gfortran-dg.exp index 50753dff88c..dca4de45d01 100644 --- a/gcc/testsuite/lib/gfortran-dg.exp +++ b/gcc/testsuite/lib/gfortran-dg.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/gfortran.exp b/gcc/testsuite/lib/gfortran.exp index d9934fc07ab..920403514e2 100644 --- a/gcc/testsuite/lib/gfortran.exp +++ b/gcc/testsuite/lib/gfortran.exp @@ -1,5 +1,4 @@ -# Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. +# Copyright (C) 2003-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/gnat-dg.exp b/gcc/testsuite/lib/gnat-dg.exp index e6fe07ed14b..f66273cf950 100644 --- a/gcc/testsuite/lib/gnat-dg.exp +++ b/gcc/testsuite/lib/gnat-dg.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007, 2010, 2011 Free Software Foundation, Inc. +# Copyright (C) 2006-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/gnat.exp b/gcc/testsuite/lib/gnat.exp index 21cfce4315b..a821edb3074 100644 --- a/gcc/testsuite/lib/gnat.exp +++ b/gcc/testsuite/lib/gnat.exp @@ -1,5 +1,4 @@ -# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 -# Free Software Foundation, Inc. +# Copyright (C) 2006-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/go-dg.exp b/gcc/testsuite/lib/go-dg.exp index 16bf12df69f..f93aec648f2 100644 --- a/gcc/testsuite/lib/go-dg.exp +++ b/gcc/testsuite/lib/go-dg.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/go-torture.exp b/gcc/testsuite/lib/go-torture.exp index 209b8f8d675..a67b0817a66 100644 --- a/gcc/testsuite/lib/go-torture.exp +++ b/gcc/testsuite/lib/go-torture.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2009, 2011, 2012 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/go.exp b/gcc/testsuite/lib/go.exp index 8c908a5ced1..5adf8717744 100644 --- a/gcc/testsuite/lib/go.exp +++ b/gcc/testsuite/lib/go.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/lto.exp b/gcc/testsuite/lib/lto.exp index 536d629f9bb..8c2db333449 100644 --- a/gcc/testsuite/lib/lto.exp +++ b/gcc/testsuite/lib/lto.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2009, 2010 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/mike-g++.exp b/gcc/testsuite/lib/mike-g++.exp index 21639020c46..db26fa52782 100644 --- a/gcc/testsuite/lib/mike-g++.exp +++ b/gcc/testsuite/lib/mike-g++.exp @@ -1,5 +1,4 @@ -# Copyright (C) 1988, 90, 91, 92, 95, 96, 1997, 2007 -# Free Software Foundation, Inc. +# Copyright (C) 1988-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/mike-gcc.exp b/gcc/testsuite/lib/mike-gcc.exp index 9e85fefcffe..86e7796e450 100644 --- a/gcc/testsuite/lib/mike-gcc.exp +++ b/gcc/testsuite/lib/mike-gcc.exp @@ -1,5 +1,4 @@ -# Copyright (C) 1988, 90, 91, 92, 95, 96, 1997, 2007 -# Free Software Foundation, Inc. +# Copyright (C) 1988-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/obj-c++-dg.exp b/gcc/testsuite/lib/obj-c++-dg.exp index f1f6d23ead6..c2435e8cc4e 100644 --- a/gcc/testsuite/lib/obj-c++-dg.exp +++ b/gcc/testsuite/lib/obj-c++-dg.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2007, 2010 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/obj-c++.exp b/gcc/testsuite/lib/obj-c++.exp index 773b7c9e812..0be2ce57a07 100644 --- a/gcc/testsuite/lib/obj-c++.exp +++ b/gcc/testsuite/lib/obj-c++.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2005, 2007, 2008, 2010 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/objc-dg.exp b/gcc/testsuite/lib/objc-dg.exp index b8246d95b3f..01709fcea55 100644 --- a/gcc/testsuite/lib/objc-dg.exp +++ b/gcc/testsuite/lib/objc-dg.exp @@ -1,5 +1,4 @@ -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2007, 2010 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/objc-torture.exp b/gcc/testsuite/lib/objc-torture.exp index 357ab76398c..1396d134f8b 100644 --- a/gcc/testsuite/lib/objc-torture.exp +++ b/gcc/testsuite/lib/objc-torture.exp @@ -1,5 +1,4 @@ -# Copyright (C) 1992-1998, 1999, 2000, 2007, 2008, 2010 -# Free Software Foundation, Inc. +# Copyright (C) 1992-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/objc.exp b/gcc/testsuite/lib/objc.exp index 8cff974602f..38fe25c2f5b 100644 --- a/gcc/testsuite/lib/objc.exp +++ b/gcc/testsuite/lib/objc.exp @@ -1,5 +1,4 @@ -# Copyright (C) 1992, 1993, 1994, 1996, 1997, 2000, 2001, 2002, 2004, 2005, -# 2007, 2008, 2010 Free Software Foundation, Inc. +# Copyright (C) 1992-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/options.exp b/gcc/testsuite/lib/options.exp index ab4819343f7..df0cd2abaec 100644 --- a/gcc/testsuite/lib/options.exp +++ b/gcc/testsuite/lib/options.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/plugin-support.exp b/gcc/testsuite/lib/plugin-support.exp index fcbbb675c58..88033b3286a 100644 --- a/gcc/testsuite/lib/plugin-support.exp +++ b/gcc/testsuite/lib/plugin-support.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2009, 2010, 2012 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/profopt.exp b/gcc/testsuite/lib/profopt.exp index b74b7cae1e7..cdc6b005252 100644 --- a/gcc/testsuite/lib/profopt.exp +++ b/gcc/testsuite/lib/profopt.exp @@ -1,5 +1,4 @@ -# Copyright (C) 2001, 2004, 2005, 2007, 2008, 2010, 2011 -# Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/prune.exp b/gcc/testsuite/lib/prune.exp index 60a4bd4b994..c110fc6056f 100644 --- a/gcc/testsuite/lib/prune.exp +++ b/gcc/testsuite/lib/prune.exp @@ -1,5 +1,4 @@ -# Copyright (C) 1997, 1999, 2000, 2002, 2004, 2007, 2008, 2010, 2011, 2012 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/scanasm.exp b/gcc/testsuite/lib/scanasm.exp index a7d4f43b1a6..6a2c0fd7fc1 100644 --- a/gcc/testsuite/lib/scanasm.exp +++ b/gcc/testsuite/lib/scanasm.exp @@ -1,5 +1,4 @@ -# Copyright (C) 2000, 2002, 2003, 2007, 2008, 2010, 2011, 2012 -# Free Software Foundation, Inc. +# Copyright (C) 2000-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/scandump.exp b/gcc/testsuite/lib/scandump.exp index b3bf2a93580..a7bec962b47 100644 --- a/gcc/testsuite/lib/scandump.exp +++ b/gcc/testsuite/lib/scandump.exp @@ -1,5 +1,4 @@ -# Copyright (C) 2000, 2002, 2003, 2005, 2007, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 2000-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/scanipa.exp b/gcc/testsuite/lib/scanipa.exp index 113e453f721..b02f5458715 100644 --- a/gcc/testsuite/lib/scanipa.exp +++ b/gcc/testsuite/lib/scanipa.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2000, 2002, 2003, 2005, 2007 Free Software Foundation, Inc. +# Copyright (C) 2000-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/scanrtl.exp b/gcc/testsuite/lib/scanrtl.exp index e33328bb7f1..ac885e6f5c6 100644 --- a/gcc/testsuite/lib/scanrtl.exp +++ b/gcc/testsuite/lib/scanrtl.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007 Free Software Foundation, Inc. +# Copyright (C) 2006-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/scantree.exp b/gcc/testsuite/lib/scantree.exp index 7b9aca3da17..4e016b5f9af 100644 --- a/gcc/testsuite/lib/scantree.exp +++ b/gcc/testsuite/lib/scantree.exp @@ -1,5 +1,4 @@ -# Copyright (C) 2000, 2002, 2003, 2005, 2006, 2007 -# Free Software Foundation, Inc. +# Copyright (C) 2000-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/target-libpath.exp b/gcc/testsuite/lib/target-libpath.exp index 2feab434ecd..d6ad0138840 100644 --- a/gcc/testsuite/lib/target-libpath.exp +++ b/gcc/testsuite/lib/target-libpath.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2005, 2007, 2009, 2012 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/target-supports-dg.exp b/gcc/testsuite/lib/target-supports-dg.exp index 3e3a3d0cea6..fffd8bb48b2 100644 --- a/gcc/testsuite/lib/target-supports-dg.exp +++ b/gcc/testsuite/lib/target-supports-dg.exp @@ -1,5 +1,4 @@ -# Copyright (C) 1997, 1999, 2000, 2003, 2004, 2005, 2007, 2008, 2009, 2010, -# 2011 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index a3828cbbec6..2fc050c9b44 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -1,5 +1,4 @@ -# Copyright (C) 1999, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -3699,7 +3698,8 @@ proc check_effective_target_vect_condition { } { verbose "check_effective_target_vect_cond: using cached result" 2 } else { set et_vect_cond_saved 0 - if { [istarget powerpc*-*-*] + if { [istarget aarch64*-*-*] + || [istarget powerpc*-*-*] || [istarget ia64-*-*] || [istarget i?86-*-*] || [istarget spu-*-*] @@ -3952,7 +3952,8 @@ proc check_effective_target_vect_call_sqrtf { } { verbose "check_effective_target_vect_call_sqrtf: using cached result" 2 } else { set et_vect_call_sqrtf_saved 0 - if { [istarget i?86-*-*] + if { [istarget aarch64*-*-*] + || [istarget i?86-*-*] || [istarget x86_64-*-*] || ([istarget powerpc*-*-*] && [check_vsx_hw_available]) } { set et_vect_call_sqrtf_saved 1 diff --git a/gcc/testsuite/lib/timeout-dg.exp b/gcc/testsuite/lib/timeout-dg.exp index 45de9041cc5..6414abdf454 100644 --- a/gcc/testsuite/lib/timeout-dg.exp +++ b/gcc/testsuite/lib/timeout-dg.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2008 Free Software Foundation, Inc. +# Copyright (C) 2008-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/timeout.exp b/gcc/testsuite/lib/timeout.exp index c8cb09fddcd..b393a3e5449 100644 --- a/gcc/testsuite/lib/timeout.exp +++ b/gcc/testsuite/lib/timeout.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2008 Free Software Foundation, Inc. +# Copyright (C) 2008-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/torture-options.exp b/gcc/testsuite/lib/torture-options.exp index f3b3e22948b..cc01575a92f 100644 --- a/gcc/testsuite/lib/torture-options.exp +++ b/gcc/testsuite/lib/torture-options.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2008 Free Software Foundation, Inc. +# Copyright (C) 2008-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/wrapper.exp b/gcc/testsuite/lib/wrapper.exp index b7f7773aac5..776b93b7f64 100644 --- a/gcc/testsuite/lib/wrapper.exp +++ b/gcc/testsuite/lib/wrapper.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2007 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/obj-c++.dg/attributes/attributes.exp b/gcc/testsuite/obj-c++.dg/attributes/attributes.exp index 1d4cae4ef2e..0e1a11dd0a7 100644 --- a/gcc/testsuite/obj-c++.dg/attributes/attributes.exp +++ b/gcc/testsuite/obj-c++.dg/attributes/attributes.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2010 Free Software Foundation, Inc. +# Copyright (C) 2010-2013 Free Software Foundation, Inc. # # This file is part of GCC. # diff --git a/gcc/testsuite/obj-c++.dg/dg.exp b/gcc/testsuite/obj-c++.dg/dg.exp index fb809b48446..71ca14294b5 100644 --- a/gcc/testsuite/obj-c++.dg/dg.exp +++ b/gcc/testsuite/obj-c++.dg/dg.exp @@ -1,5 +1,5 @@ # GCC Objective-C++ testsuite that uses the `dg.exp' driver. -# Copyright (C) 2004, 2007, 2010 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/obj-c++.dg/lto/lto.exp b/gcc/testsuite/obj-c++.dg/lto/lto.exp index 4ae08c17277..df4131ad84c 100644 --- a/gcc/testsuite/obj-c++.dg/lto/lto.exp +++ b/gcc/testsuite/obj-c++.dg/lto/lto.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2010 Free Software Foundation, Inc. +# Copyright (C) 2010-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/obj-c++.dg/property/property.exp b/gcc/testsuite/obj-c++.dg/property/property.exp index 133ff658f6a..73f9feb5d68 100644 --- a/gcc/testsuite/obj-c++.dg/property/property.exp +++ b/gcc/testsuite/obj-c++.dg/property/property.exp @@ -1,5 +1,5 @@ # GCC Objective-C++ testsuite that uses the `dg.exp' driver. -# Copyright (C) 2004, 2007, 2010, 2011 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/obj-c++.dg/strings/strings.exp b/gcc/testsuite/obj-c++.dg/strings/strings.exp index 82cd925bb23..316dbf99705 100644 --- a/gcc/testsuite/obj-c++.dg/strings/strings.exp +++ b/gcc/testsuite/obj-c++.dg/strings/strings.exp @@ -1,6 +1,6 @@ # String tests that only need to run at default optimization. -# Copyright (C) 2010 Free Software Foundation, Inc. +# Copyright (C) 2010-2013 Free Software Foundation, Inc. # # This file is part of GCC. # diff --git a/gcc/testsuite/obj-c++.dg/torture/strings/strings.exp b/gcc/testsuite/obj-c++.dg/torture/strings/strings.exp index 180401c3b76..1d00ee08eaf 100644 --- a/gcc/testsuite/obj-c++.dg/torture/strings/strings.exp +++ b/gcc/testsuite/obj-c++.dg/torture/strings/strings.exp @@ -1,6 +1,6 @@ # String tests that should be run at all optimization levels. -# Copyright (C) 2010 Free Software Foundation, Inc. +# Copyright (C) 2010-2013 Free Software Foundation, Inc. # # This file is part of GCC. # diff --git a/gcc/testsuite/objc-obj-c++-shared/TestsuiteObject.m b/gcc/testsuite/objc-obj-c++-shared/TestsuiteObject.m index 2068a916436..30090d8064e 100644 --- a/gcc/testsuite/objc-obj-c++-shared/TestsuiteObject.m +++ b/gcc/testsuite/objc-obj-c++-shared/TestsuiteObject.m @@ -1,5 +1,5 @@ /* Very simple root class for writing testcases. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2013 Free Software Foundation, Inc. Contributed by Nicola Pero This file is part of GCC. diff --git a/gcc/testsuite/objc.dg/attributes/attributes.exp b/gcc/testsuite/objc.dg/attributes/attributes.exp index cb11216c5be..6f16d45b1a5 100644 --- a/gcc/testsuite/objc.dg/attributes/attributes.exp +++ b/gcc/testsuite/objc.dg/attributes/attributes.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2010 Free Software Foundation, Inc. +# Copyright (C) 2010-2013 Free Software Foundation, Inc. # # This file is part of GCC. # diff --git a/gcc/testsuite/objc.dg/dg.exp b/gcc/testsuite/objc.dg/dg.exp index 350c4b8339f..b8ff62a49a5 100644 --- a/gcc/testsuite/objc.dg/dg.exp +++ b/gcc/testsuite/objc.dg/dg.exp @@ -1,5 +1,5 @@ # GCC Objective-C testsuite that uses the `dg.exp' driver. -# Copyright (C) 1997, 2001, 2007, 2010 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/objc.dg/gnu-encoding/gnu-encoding.exp b/gcc/testsuite/objc.dg/gnu-encoding/gnu-encoding.exp index b137b751ae0..667ddf13a68 100644 --- a/gcc/testsuite/objc.dg/gnu-encoding/gnu-encoding.exp +++ b/gcc/testsuite/objc.dg/gnu-encoding/gnu-encoding.exp @@ -1,5 +1,5 @@ # GCC Objective-C testsuite that uses the `dg.exp' driver. -# Copyright (C) 1997, 2001, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/objc.dg/lto/lto.exp b/gcc/testsuite/objc.dg/lto/lto.exp index f567cd93e2b..7f471e938e2 100644 --- a/gcc/testsuite/objc.dg/lto/lto.exp +++ b/gcc/testsuite/objc.dg/lto/lto.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2010 Free Software Foundation, Inc. +# Copyright (C) 2010-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/objc.dg/pch/pch.exp b/gcc/testsuite/objc.dg/pch/pch.exp index 0fca64125ec..90b5b17d2a9 100644 --- a/gcc/testsuite/objc.dg/pch/pch.exp +++ b/gcc/testsuite/objc.dg/pch/pch.exp @@ -1,5 +1,4 @@ -# Copyright (C) 1997, 2002, 2003, 2007, 2008, 2010 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/objc.dg/property/property.exp b/gcc/testsuite/objc.dg/property/property.exp index e8773018841..f7ba5d4ea6b 100644 --- a/gcc/testsuite/objc.dg/property/property.exp +++ b/gcc/testsuite/objc.dg/property/property.exp @@ -1,5 +1,5 @@ # GCC Objective-C testsuite that uses the `dg.exp' driver. -# Copyright (C) 1997, 2001, 2007, 2010 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/objc.dg/special/special.exp b/gcc/testsuite/objc.dg/special/special.exp index bab6798d97a..cb11fccee72 100644 --- a/gcc/testsuite/objc.dg/special/special.exp +++ b/gcc/testsuite/objc.dg/special/special.exp @@ -1,5 +1,5 @@ # GCC Objective-C testsuite that uses the `dg.exp' driver. -# Copyright (C) 1997, 2001, 2007, 2010 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/objc.dg/strings/strings.exp b/gcc/testsuite/objc.dg/strings/strings.exp index 823c2871a57..d871c815166 100644 --- a/gcc/testsuite/objc.dg/strings/strings.exp +++ b/gcc/testsuite/objc.dg/strings/strings.exp @@ -1,6 +1,6 @@ # String tests that only need to run at default optimization. -# Copyright (C) 2010 Free Software Foundation, Inc. +# Copyright (C) 2010-2013 Free Software Foundation, Inc. # # This file is part of GCC. # diff --git a/gcc/testsuite/objc.dg/torture/strings/strings.exp b/gcc/testsuite/objc.dg/torture/strings/strings.exp index e309186136d..e4d10eab98b 100644 --- a/gcc/testsuite/objc.dg/torture/strings/strings.exp +++ b/gcc/testsuite/objc.dg/torture/strings/strings.exp @@ -1,6 +1,6 @@ # String tests that should be run at all optimization levels. -# Copyright (C) 2010 Free Software Foundation, Inc. +# Copyright (C) 2010-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/objc/compile/compile.exp b/gcc/testsuite/objc/compile/compile.exp index afc23430174..8bc5e2a1323 100644 --- a/gcc/testsuite/objc/compile/compile.exp +++ b/gcc/testsuite/objc/compile/compile.exp @@ -1,5 +1,4 @@ -# Copyright (C) 1991, 1992, 1993, 1995, 1997, 2001, 2007, 2008, 2010 -# Free Software Foundation, Inc. +# Copyright (C) 1991-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/objc/execute/exceptions/exceptions.exp b/gcc/testsuite/objc/execute/exceptions/exceptions.exp index 0443ca130ee..d5f5e40f0b8 100644 --- a/gcc/testsuite/objc/execute/exceptions/exceptions.exp +++ b/gcc/testsuite/objc/execute/exceptions/exceptions.exp @@ -1,5 +1,4 @@ -# Copyright (C) 1991, 1992, 1993, 1995, 1997, 2007, 2008, 2010 -# Free Software Foundation, Inc. +# Copyright (C) 1991-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/objc/execute/execute.exp b/gcc/testsuite/objc/execute/execute.exp index 40ca40b61dd..51b167d190e 100644 --- a/gcc/testsuite/objc/execute/execute.exp +++ b/gcc/testsuite/objc/execute/execute.exp @@ -1,5 +1,4 @@ -# Copyright (C) 1991, 1992, 1993, 1995, 1997, 2007, 2008, 2010 -# Free Software Foundation, Inc. +# Copyright (C) 1991-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by |