summaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog244
-rw-r--r--gcc/testsuite/g++.dg/ext/complit9.C15
-rw-r--r--gcc/testsuite/g++.dg/opt/20050511-1.C5
-rw-r--r--gcc/testsuite/g++.dg/torture/pr35400.C13
-rw-r--r--gcc/testsuite/g++.dg/warn/ctor1.C13
-rw-r--r--gcc/testsuite/g++.dg/warn/miss-format-1.C5
-rw-r--r--gcc/testsuite/g++.old-deja/g++.abi/cxa_vec.C7
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/new3.C7
-rw-r--r--gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C6
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/missed-error2.C6
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/init1.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/p2736.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/p658.C6
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/headers1.C6
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb79.C6
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20001226-1.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20010226-1.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20010327-1.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20020604-1.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20050122-2.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/980506-1.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/limits-stringlit.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/nested-1.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr27889.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr35869.c47
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20071211-1.c4
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20080408-1.c11
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr35163.c4
-rw-r--r--gcc/testsuite/gcc.dg/attr-error-1.c12
-rw-r--r--gcc/testsuite/gcc.dg/titype-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/torture/fp-int-convert.h2
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr35400.c22
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr35833.c22
-rwxr-xr-xgcc/testsuite/gcc.dg/torture/pr35842.c12
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr35821-altivec.c24
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr35821-spu.c22
-rw-r--r--gcc/testsuite/gcc.target/i386/pr12329.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/sse-13.c10
-rw-r--r--gcc/testsuite/gcc.target/i386/sse-14.c6
-rw-r--r--gcc/testsuite/gcc.target/mips/scc-2.c17
-rw-r--r--gcc/testsuite/gcc.target/mips/scc-3.c17
-rw-r--r--gcc/testsuite/gcc.target/mips/scc-4.c13
-rw-r--r--gcc/testsuite/gcc.target/powerpc/darwin-save-world-1.c18
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_usage_14.f0328
-rw-r--r--gcc/testsuite/gfortran.dg/continuation_10.f9055
-rw-r--r--gcc/testsuite/gfortran.dg/continuation_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/continuation_5.f2
-rw-r--r--gcc/testsuite/gfortran.dg/f2003_io_1.f0337
-rw-r--r--gcc/testsuite/gfortran.dg/f2003_io_2.f0322
-rw-r--r--gcc/testsuite/gfortran.dg/f2003_io_3.f0321
-rw-r--r--gcc/testsuite/gfortran.dg/f2003_io_4.f0333
-rw-r--r--gcc/testsuite/gfortran.dg/f2003_io_5.f0326
-rw-r--r--gcc/testsuite/gfortran.dg/f2003_io_6.f0311
-rw-r--r--gcc/testsuite/gfortran.dg/f2003_io_7.f0327
-rw-r--r--gcc/testsuite/gfortran.dg/f2003_io_8.f0313
-rw-r--r--gcc/testsuite/gfortran.dg/internal_pack_1.f9021
-rw-r--r--gcc/testsuite/gfortran.dg/intrinsic_pack_1.f9028
-rw-r--r--gcc/testsuite/gfortran.dg/intrinsic_spread_1.f9019
-rw-r--r--gcc/testsuite/gfortran.dg/intrinsic_unpack_1.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/io_constraints_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/io_constraints_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_47.f9052
-rw-r--r--gcc/testsuite/gfortran.dg/simplify_argN_1.f9026
-rw-r--r--gcc/testsuite/gfortran.dg/write_check2.f906
-rw-r--r--gcc/testsuite/gnat.dg/ancestor_type.adb13
-rw-r--r--gcc/testsuite/gnat.dg/ancestor_type.ads13
-rw-r--r--gcc/testsuite/gnat.dg/array4.adb37
-rw-r--r--gcc/testsuite/gnat.dg/deep_old.adb8
-rw-r--r--gcc/testsuite/gnat.dg/loop_address2.adb26
-rw-r--r--gcc/testsuite/gnat.dg/pack5.adb32
-rw-r--r--gcc/testsuite/gnat.dg/pack6.adb27
-rw-r--r--gcc/testsuite/gnat.dg/pack7.adb27
-rw-r--r--gcc/testsuite/gnat.dg/pack8.adb27
-rw-r--r--gcc/testsuite/gnat.dg/parent_ltd_with-child_full_view.adb12
-rw-r--r--gcc/testsuite/gnat.dg/parent_ltd_with-child_full_view.ads12
-rw-r--r--gcc/testsuite/gnat.dg/parent_ltd_with.ads15
-rw-r--r--gcc/testsuite/gnat.dg/pr35823.adb6
-rw-r--r--gcc/testsuite/gnat.dg/rt1.adb9
-rw-r--r--gcc/testsuite/gnat.dg/rt1.ads14
-rw-r--r--gcc/testsuite/gnat.dg/size_attribute.adb8
-rw-r--r--gcc/testsuite/gnat.dg/specs/aggr1.ads8
-rw-r--r--gcc/testsuite/gnat.dg/specs/fe_inlining.ads4
-rw-r--r--gcc/testsuite/gnat.dg/specs/fe_inlining_helper.adb4
-rw-r--r--gcc/testsuite/gnat.dg/specs/fe_inlining_helper.ads3
-rw-r--r--gcc/testsuite/gnat.dg/specs/linker_section.ads10
-rw-r--r--gcc/testsuite/gnat.dg/specs/renamings.ads14
-rw-r--r--gcc/testsuite/gnat.dg/specs/static_initializer2.ads22
-rw-r--r--gcc/testsuite/gnat.dg/specs/storage.ads10
-rw-r--r--gcc/testsuite/gnat.dg/specs/warnstar.ads12
-rw-r--r--gcc/testsuite/gnat.dg/test_time_stamp.adb37
-rw-r--r--gcc/testsuite/lib/target-supports.exp28
91 files changed, 1481 insertions, 47 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 08e354548bb..8af67f7b0b7 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,235 @@
+2008-04-14 Samuel Tardieu <sam@rfc1149.net>
+
+ PR ada/18680
+ * gnat.dg/specs/linker_section.ads: New.
+
+2008-04-14 Samuel Tardieu <sam@rfc1149.net>
+
+ PR ada/16098
+ * gnat.dg/specs/renamings.ads: New.
+
+2008-04-14 Samuel Tardieu <sam@rfc1149.net>
+
+ PR ada/15915
+ * gnat.dg/specs/storage.ads: New.
+
+2008-04-14 Samuel Tardieu <sam@rfc1149.net>
+
+ * gnat.dg/deep_old.adb: New.
+
+2008-04-14 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/loop_address2.adb: New test.
+
+2008-04-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/35882
+ * gfortran.dg/continuation_3.f90: Update test.
+ * gfortran.dg/continuation_5.f: Update test.
+ * gfortran.dg/continuation_10.f90: New test.
+
+2008-04-13 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR libfortran/32972
+ PR libfortran/32512
+ * gfortran.dg/internal_pack_1.f90: Add test for derived type.
+ * gfortran.dg/intrinsic_spread_1.f90: Likewise.
+ * gfortran.dg/intrinsic_pack_1.f90: Likewise.
+ * gfortran.dg/intrinsic_unpack_1.f90: Likewise.
+
+2008-04-13 Samuel Tardieu <sam@rfc1149.net>
+
+ PR ada/17985
+ * gnat.dg/ancestor_type.ads, gnat.dg/ancestor_type.adb: New test.
+
+2008-04-12 Andrew Pinski <pinskia@gmail.com>
+
+ * gcc.target/powerpc/darwin-save-world-1.c: New test.
+
+2008-04-11 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/35869
+ * gcc.c-torture/compile/pr35869.c: New testcase.
+
+2008-04-11 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/sse-13.c: Move __builtin_ia32_round* to new
+ /* mmintrin-common.h */ section.
+
+ * gcc.target/i386/sse-14.c: Add tests for mmintrin-common.h.
+
+2008-04-11 Volker Reichelt <v.reichelt@netcologne.de>
+
+ PR c/35744
+ * gcc.dg/attr-error-1.c: New test.
+
+2008-04-10 Adam Nemet <anemet@caviumnetworks.com>
+
+ * gcc.target/mips/scc-2.c: New test.
+ * gcc.target/mips/scc-3.c: New test.
+ * gcc.target/mips/scc-4.c: New test.
+
+2008-04-10 Ira Rosen <irar@il.ibm.com>
+
+ PR tree-optimization/35821
+ * gcc.dg/vect/pr35821-altivec.c: New.
+ * gcc.dg/vect/pr35821-spu.c: New.
+
+2008-04-09 Andy Hutchinson <hutchinsonandy@aim.com>
+
+ PR testsuite/34894
+ PR testsuite/33782
+ * lib/target-supports.dg: Add check_effective_target_trampolines.
+ Disable profiling for avr-*-*.
+ * gcc.c-torture/compile/pr27889.c: dg-requires trampolines.
+ * gcc.c-torture/compile/nested-1.c: Ditto.
+ * gcc.c-torture/compile/20050122-2.c: Ditto.
+ * gcc.c-torture/compile/20010226-1.c: Ditto.
+ * gcc.c-torture/compile/20010327-1.c: Skip for avr-*-*.
+ * gcc.c-torture/compile/980506-1.c: Ditto.
+ * gcc.c-torture/compile/20020604-1.c: Ditto.
+ * gcc.c-torture/compile/limits-stringlit.c: Ditto
+ * gcc.c-torture/compile/20001226-1.c: Ditto
+
+2008-04-09 Jason Merrill <jason@redhat.com>
+
+ PR c++/35708
+ * g++.dg/ext/complit9.C: New.
+
+2008-04-09 Samuel Tardieu <sam@rfc1149.net>
+
+ PR ada/28305
+ * gnat.dg/specs/fe_inlining.ads, gnat.dg/specs/fe_inlining_helper.ads,
+ gnat.dg/specs/fe_inlining_helper.adb: New test.
+
+2008-04-09 Kai Tietz <kai.tietz@onevision.com>
+
+ * gcc.dg/torture/fp-int-convert.h: Use TImode type for
+ x86_64-pc-mingw target.
+ * gcc.dg/titype-1.c: Likewise.
+
+2008-04-09 Richard Sandiford <richard@codesourcery.com>
+
+ * lib/target-supports.exp (check_effective_target_vxworks_kernel):
+ Fix comment.
+ (check_effective_target_vxworks_rtp): New procedure.
+ * g++.dg/opt/20050511-1.C: Rename UINT32 for VxWorks kernel mode.
+ * g++.dg/warn/miss-format-1.C: XFAIL for VxWorks.
+ * g++.old-deja/g++.abi/cxa_vec.C: XFAIL for VxWorks kernels.
+ * g++.old-deja/g++.brendan/new3.C: Likewise.
+ * g++.old-deja/g++.eh/badalloc1.C: XFAIL for VxWorks RTPs.
+ * g++.old-deja/g++.law/missed-error2.C: Undefine max for
+ VxWorks kernel mode.
+ * g++.old-deja/g++.mike/init1.C: XFAIL for VxWorks kernel mode.
+ * g++.old-deja/g++.mike/p2736.C: Likewise.
+ * g++.old-deja/g++.mike/p658.C: Undefine OK for VxWorks kernel mode.
+ * g++.old-deja/g++.other/headers1.C: Likewise min and max.
+ * g++.old-deja/g++.robertl/eb79.C: Undefine max for VxWorks
+ kernel mode.
+
+2008-04-09 Jakub Jelinek <jakub@redhat.com>
+
+ * gfortran.dg/namelist_47.f90: New test.
+
+2008-04-09 Richard Guenther <rguenther@suse.de>
+
+ * gfortran.dg/bind_c_usage_14.f03: Adjust.
+
+2008-04-08 Andy Hutchinson <hutchinsonandy@aim.com>
+
+ PR target/35005
+ * execute/20071221-1.c: Adapt test for 16 bit int targets.
+ * execute/pr35163.c: Ditto.
+
+2008-04-08 Richard Guenther <rguenther@suse.de>
+
+ * gcc.c-torture/execute/20080408-1.c: New testcase.
+
+2008-04-08 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/pack6.adb: New test.
+ * gnat.dg/pack7.adb: Likewise.
+ * gnat.dg/pack8.adb: Likewise.
+
+2008-04-08 Arnaud Charlet <charlet@adacore.com>
+
+ * gnat.dg/parent_ltd_with-child_full_view.adb: New test.
+ * gnat.dg/rt1.adb: New test.
+ * gnat.dg/test_time_stamp.adb: New test.
+ * gnat.dg/specs/warn_star.ads: New test.
+ * gnat.dg/specs/aggr1.ads: New test.
+
+2008-04-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/25829 28655
+ * gfortran.dg/write_check2.f90: Update dg-error.
+ * gfortran.dg/io_constraints_1.f90: Udate dg-error.
+
+2008-04-07 Jason Merrill <jason@redhat.com>
+
+ PR c++/35734
+ * g++.dg/warn/ctor1.C: New.
+
+2008-04-07 Kai Tietz <kai.tietz@onevision.com>
+
+ PR/35842
+ * gcc.dg/torture/pr35842.c: New.
+
+2008-04-07 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/array4.adb: New test.
+ * gnat.dg/specs/static_initializer2.ads: Likewise.
+
+2008-04-06 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/35400
+ * gcc.dg/torture/pr35400.c: New testcase.
+ * g++.dg/torture/pr35400.C: Likewise.
+
+2008-04-06 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/35780
+ * gfortran.dg/simplify_argN_1.f90: New test.
+
+2008-04-06 Tobias Schlüter <tobi@gcc.gnu.org>
+
+ PR fortran/35832
+ * gfortran.dg/io_constraints_2.f90: Adapt to new error message.
+
+2008-04-06 Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.dg/f2003_io_1.f03: Make standard conform.
+ * gfortran.dg/f2003_io_8.f03: New.
+
+2008-04-06 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/pack5.adb: New test.
+
+2008-04-06 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/12329
+ * gcc.target/i386/pr12329.c: New test.
+
+2008-04-05 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/pr35823.adb: Rename to size_attribute.adb.
+
+2008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/25829 28655
+ * gfortran.dg/f2003_io_1.f03: New test.
+ * gfortran.dg/f2003_io_2.f03: New test.
+ * gfortran.dg/f2003_io_3.f03: New test.
+ * gfortran.dg/f2003_io_4.f03: New test.
+ * gfortran.dg/f2003_io_5.f03: New test.
+ * gfortran.dg/f2003_io_6.f03: New test.
+ * gfortran.dg/f2003_io_7.f03: New test.
+
+2008-04-05 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/35833
+ * gcc.dg/torture/pr35833.c: New testcase.
+
2008-04-04 Naveen.H.S <naveen.hs@kpitcummins.com>
* gcc.target/sh/sh2a-band.c: New test.
@@ -143,12 +375,12 @@
* lib/gfortran-dg.exp: New harness to compile Fortran progs
with all combinations of debug options available on target.
- * gfortran.dg/debug/debug.exp: Ditto.
- * gfortran.dg/debug/trivial.f: Ditto.
- * gfortran.dg/debug/pr35154-stabs.f: New test case for
- .stabs functionality.
- * gfortran.dg/debug/pr35154-dwarf2.f: New test case for
- DWARF functionality.
+ * gfortran.dg/debug/debug.exp: Ditto.
+ * gfortran.dg/debug/trivial.f: Ditto.
+ * gfortran.dg/debug/pr35154-stabs.f: New test case for
+ .stabs functionality.
+ * gfortran.dg/debug/pr35154-dwarf2.f: New test case for
+ DWARF functionality.
2008-04-01 Volker Reichelt <v.reichelt@netcologne.de>
diff --git a/gcc/testsuite/g++.dg/ext/complit9.C b/gcc/testsuite/g++.dg/ext/complit9.C
new file mode 100644
index 00000000000..5b7fbe75cd8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/complit9.C
@@ -0,0 +1,15 @@
+// PR c++/35708
+// { dg-options "" }
+
+struct object { int one_o; int allocstamp; };
+int pgci_pointable (object obj);
+void foo(void);
+int main (int argc, char *argv[])
+{
+ if (pgci_pointable((object){7,100}))
+ {
+ bad_rehash_size:
+ foo();
+ }
+ goto bad_rehash_size;
+}
diff --git a/gcc/testsuite/g++.dg/opt/20050511-1.C b/gcc/testsuite/g++.dg/opt/20050511-1.C
index 2fbd3e1be5e..a8929030af4 100644
--- a/gcc/testsuite/g++.dg/opt/20050511-1.C
+++ b/gcc/testsuite/g++.dg/opt/20050511-1.C
@@ -4,6 +4,11 @@
#include <stdio.h>
#include <stdlib.h>
+// The VxWorks kernel headers define their own UINT32
+#if defined __vxworks && !defined __RTP__
+#define UINT32 my_UINT32
+#endif
+
typedef signed short SINT16 ;
typedef unsigned long UINT32 ;
typedef unsigned int UINT ;
diff --git a/gcc/testsuite/g++.dg/torture/pr35400.C b/gcc/testsuite/g++.dg/torture/pr35400.C
new file mode 100644
index 00000000000..021135df813
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr35400.C
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-Wtype-limits" } */
+
+struct A
+{
+ A();
+ ~A();
+};
+
+void foo()
+{
+ A x[1];
+}
diff --git a/gcc/testsuite/g++.dg/warn/ctor1.C b/gcc/testsuite/g++.dg/warn/ctor1.C
new file mode 100644
index 00000000000..00a6c952b64
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/ctor1.C
@@ -0,0 +1,13 @@
+// PR c++/35734
+// { dg-options "-W" }
+
+struct A
+{
+ A();
+ template<typename T> A(const T&);
+};
+
+struct B : A
+{
+ B(const B&) {} // { dg-warning "base class" }
+};
diff --git a/gcc/testsuite/g++.dg/warn/miss-format-1.C b/gcc/testsuite/g++.dg/warn/miss-format-1.C
index 56a5c7b1383..ec9dbc1c3bd 100644
--- a/gcc/testsuite/g++.dg/warn/miss-format-1.C
+++ b/gcc/testsuite/g++.dg/warn/miss-format-1.C
@@ -2,7 +2,8 @@
/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
/* { dg-do compile } */
/* { dg-options "-Wmissing-format-attribute" } */
-/* { dg-error "not declared" "" { target *-*-solaris2.5.1 *-*-solaris2.[5-8] } 24 } */
+/* VxWorks does not provide vscanf, either in kernel or RTP mode. */
+/* { dg-error "not declared" "" { target *-*-solaris2.5.1 *-*-solaris2.[5-8] *-*-vxworks* } 25 } */
#include <stdio.h>
#include <stdarg.h>
@@ -21,7 +22,7 @@ bar (const char *fmt, ...)
{
va_list ap;
va_start (ap, fmt);
- vscanf (fmt, ap); /* { dg-warning "candidate" "scanf attribute warning" { xfail *-*-solaris2.5.1 *-*-solaris2.[5-8] } } */
+ vscanf (fmt, ap); /* { dg-warning "candidate" "scanf attribute warning" { xfail *-*-solaris2.5.1 *-*-solaris2.[5-8] *-*-vxworks* } } */
va_end (ap);
}
diff --git a/gcc/testsuite/g++.old-deja/g++.abi/cxa_vec.C b/gcc/testsuite/g++.old-deja/g++.abi/cxa_vec.C
index 7be9185638b..5370fb8981d 100644
--- a/gcc/testsuite/g++.old-deja/g++.abi/cxa_vec.C
+++ b/gcc/testsuite/g++.old-deja/g++.abi/cxa_vec.C
@@ -1,4 +1,9 @@
-// { dg-do run { xfail powerpc-ibm-aix* } }
+// This test fails on VxWorks in kernel mode because it depends on the
+// library version of "::operator new[]" calling the "::operator new"
+// defined in this module. This doesn't work because the library version
+// of "::operator new[]" is built into the kernel itself; library relocations
+// are resolved when the kernel is linked.
+// { dg-do run { xfail { powerpc-ibm-aix* || vxworks_kernel } } }
// { dg-options "-flat_namespace" { target *-*-darwin[67]* } }
// Test __cxa_vec routines
// Copyright (C) 2000, 2005 Free Software Foundation, Inc.
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/new3.C b/gcc/testsuite/g++.old-deja/g++.brendan/new3.C
index b5bfb4a83b0..791d00bac96 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/new3.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/new3.C
@@ -1,4 +1,9 @@
-// { dg-do run { xfail powerpc-ibm-aix* } }
+// This test fails on VxWorks in kernel mode because it depends on the
+// library version of "::operator new[]" calling the "::operator new"
+// defined in this module. This doesn't work because the library version
+// of "::operator new[]" is built into the kernel itself; library relocations
+// are resolved when the kernel is linked.
+// { dg-do run { xfail { powerpc-ibm-aix* || vxworks_kernel } } }
// { dg-options "-flat_namespace" { target *-*-darwin[67]* } }
// GROUPS passed operator-new
#include <stdio.h>
diff --git a/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C b/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C
index 3c9941d65c8..b2e7f62b9b3 100644
--- a/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C
+++ b/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C
@@ -1,4 +1,8 @@
-// { dg-do run { xfail xstormy16-*-* *-*-darwin[1-7]* } }
+// This fails for VxWorks RTPs because the initialization of
+// __cxa_allocate_exception's emergency buffer mutex will
+// itself call malloc(), and will fail if there is no more
+// memory available.
+// { dg-do run { xfail { { xstormy16-*-* *-*-darwin[1-7]* } || vxworks_rtp } } }
// Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 6 June 2000 <nathan@codesourcery.com>
diff --git a/gcc/testsuite/g++.old-deja/g++.law/missed-error2.C b/gcc/testsuite/g++.old-deja/g++.law/missed-error2.C
index d9d6195dfe8..a26f456f20a 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/missed-error2.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/missed-error2.C
@@ -8,6 +8,12 @@
#include <iostream>
+// The VxWorks kernel-mode headers define a macro named "max", which is not
+// ISO-compliant, but is part of the VxWorks API.
+#if defined __vxworks && !defined __RTP__
+#undef max
+#endif
+
inline int max(int a, int b) {return a > b ? a : b;}; // { dg-error "" } candidate
inline double max(double a, double b) {return a > b ? a : b;}; // { dg-error "" } candidate
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/init1.C b/gcc/testsuite/g++.old-deja/g++.mike/init1.C
index 0b47fb7e705..5bc1ea4a9ac 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/init1.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/init1.C
@@ -1,4 +1,6 @@
-// { dg-do run }
+// The VxWorks kernel has no implementation of atexit, so local statics
+// are never destroyed.
+// { dg-do run { xfail vxworks_kernel } }
int count;
extern "C" void _exit(int);
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p2736.C b/gcc/testsuite/g++.old-deja/g++.mike/p2736.C
index a0a8b314338..6ae61e89260 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/p2736.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/p2736.C
@@ -1,4 +1,6 @@
-// { dg-do run }
+// The VxWorks kernel has no implementation of atexit, so local statics
+// are never destroyed.
+// { dg-do run { xfail vxworks_kernel } }
// This is a poor test case, it is meant to ensure that function local
// statics are destroyed at the right time. See PR 2736 for details.
// prms-id: 2736
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p658.C b/gcc/testsuite/g++.old-deja/g++.mike/p658.C
index 1a4fefddc07..8fc7cd51b2b 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/p658.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/p658.C
@@ -12,6 +12,12 @@
#define TRUE true
#endif
+// The VxWorks kernel-mode headers define a macro named "OK", which is not
+// ISO-compliant, but is part of the VxWorks API.
+#if defined __vxworks && !defined __RTP__
+#undef OK
+#endif
+
class Object {
public:
Object();
diff --git a/gcc/testsuite/g++.old-deja/g++.other/headers1.C b/gcc/testsuite/g++.old-deja/g++.other/headers1.C
index 31de3558f1e..1080fe38c8a 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/headers1.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/headers1.C
@@ -44,6 +44,12 @@
#include <string>
#include <typeinfo>
#include <utility>
+// The VxWorks kernel-mode headers define macros named "max" and
+// "min", which is not ISO-compliant, but is part of the VxWorks API.
+#if defined __vxworks && !defined __RTP__
+#undef max
+#undef min
+#endif
#include <valarray>
#include <vector>
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb79.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb79.C
index e5905ffbec0..8d1c94d168f 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb79.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb79.C
@@ -2,6 +2,12 @@
// Makes bogus x86 assembly code.
#include <iostream>
+// The VxWorks kernel-mode headers define a macro named "max", which is not
+// ISO-compliant, but is part of the VxWorks API.
+#if defined __vxworks && !defined __RTP__
+#undef max
+#endif
+
using namespace std;
template<class T>
diff --git a/gcc/testsuite/gcc.c-torture/compile/20001226-1.c b/gcc/testsuite/gcc.c-torture/compile/20001226-1.c
index ddea0aa0bdf..cfcf546e157 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20001226-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20001226-1.c
@@ -2,6 +2,7 @@
than 64K. */
/* { dg-do assemble } */
/* { dg-xfail-if "function larger than 64K" { m6811-*-* } { "*" } { "" } } */
+/* { dg-skip-if "too much code for avr" { "avr-*-*" } { "*" } { "" } } */
/* { dg-xfail-if "jump beyond 128K not supported" { xtensa-*-* } { "-O0" } { "" } } */
/* { dg-skip-if "" { m32c-*-* } { "*" } { "" } } */
diff --git a/gcc/testsuite/gcc.c-torture/compile/20010226-1.c b/gcc/testsuite/gcc.c-torture/compile/20010226-1.c
index c06be53dc52..f25b48390d5 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20010226-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20010226-1.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target trampolines } */
+
void f1 (void *);
void f3 (void *, void (*)(void *));
void f2 (void *);
diff --git a/gcc/testsuite/gcc.c-torture/compile/20010327-1.c b/gcc/testsuite/gcc.c-torture/compile/20010327-1.c
index 189990ade3f..59639e6ed96 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20010327-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20010327-1.c
@@ -1,4 +1,5 @@
/* { dg-skip-if "non-SI pointers" { m32c-*-* } { "*" } { "" } } */
+/* { dg-skip-if "HI mode pointer for avr" { "avr-*-*" } { "*" } { "" } } */
/* This testcase tests whether GCC can produce static initialized data
that references addresses of size 'unsigned long', even if that's not
diff --git a/gcc/testsuite/gcc.c-torture/compile/20020604-1.c b/gcc/testsuite/gcc.c-torture/compile/20020604-1.c
index 539b9f5b27f..17b9b2165ba 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20020604-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20020604-1.c
@@ -1,5 +1,6 @@
/* { dg-do assemble } */
/* { dg-xfail-if "The array is too big" { "m6811-*-* m6812-*-*" } { "*" } { "" } } */
+/* { dg-skip-if "The array is too big" { "avr-*-*" } { "*" } { "" } } */
/* { dg-xfail-if "The array too big" { "h8300-*-*" } { "-mno-h" "-mn" } { "" } } */
/* { dg-skip-if "" { m32c-*-* } { } { } } */
diff --git a/gcc/testsuite/gcc.c-torture/compile/20050122-2.c b/gcc/testsuite/gcc.c-torture/compile/20050122-2.c
index d73f6243ddd..1e297be8cb6 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20050122-2.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20050122-2.c
@@ -1,4 +1,6 @@
/* Related to PR 19484. */
+/* { dg-require-effective-target trampolines } */
+
extern void foo (void) __attribute__((noreturn));
int n;
diff --git a/gcc/testsuite/gcc.c-torture/compile/980506-1.c b/gcc/testsuite/gcc.c-torture/compile/980506-1.c
index 619e18d05e4..5c22e7e508f 100644
--- a/gcc/testsuite/gcc.c-torture/compile/980506-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/980506-1.c
@@ -2,6 +2,7 @@
/* { dg-do assemble } */
/* { dg-require-effective-target size32plus } */
/* { dg-xfail-if "The array too big" { m6811-*-* m6812-*-* } { "*" } { "" } } /*
+/* { dg-skip-if "Array too big" { "avr-*-*" } { "*" } { "" } } */
/* { dg-xfail-if "The array too big" { h8300-*-* } { "-mno-h" "-mn" } { "" } } */
unsigned char TIFFFax2DMode[20][256];
diff --git a/gcc/testsuite/gcc.c-torture/compile/limits-stringlit.c b/gcc/testsuite/gcc.c-torture/compile/limits-stringlit.c
index 22dc19b3c6e..5b52c83b061 100644
--- a/gcc/testsuite/gcc.c-torture/compile/limits-stringlit.c
+++ b/gcc/testsuite/gcc.c-torture/compile/limits-stringlit.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "Array too big" { "avr-*-*" } { "*" } { "" } } */
+
#define STR2 "012345678901234567890123456789012345678901234567890123456789\
0123456789012345678901234567890123456789"
#define STR3 STR2 STR2 STR2 STR2 STR2 STR2 STR2 STR2 STR2 STR2
diff --git a/gcc/testsuite/gcc.c-torture/compile/nested-1.c b/gcc/testsuite/gcc.c-torture/compile/nested-1.c
index b6aa79d77aa..135538a8524 100644
--- a/gcc/testsuite/gcc.c-torture/compile/nested-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/nested-1.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target trampolines } */
+
typedef __SIZE_TYPE__ size_t;
extern int printf (const char *, ...);
extern void *memset (void *, int, size_t);
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr27889.c b/gcc/testsuite/gcc.c-torture/compile/pr27889.c
index ca50fce707d..4e76caa5663 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr27889.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr27889.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target trampolines } */
+
void h(void (*)(void));
_Complex int g (void)
{
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr35869.c b/gcc/testsuite/gcc.c-torture/compile/pr35869.c
new file mode 100644
index 00000000000..e83c0e86bed
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr35869.c
@@ -0,0 +1,47 @@
+struct texture_stage_op
+{
+ unsigned int carg1, carg2, carg0;
+ unsigned int aarg1, aarg2, aarg0;
+ unsigned int dst;
+};
+
+static const char *debug_register(unsigned int reg) {
+ switch(reg) {
+ case 0x8921: return "GL_REG_0_ATI";
+ case 0x8923: return "GL_REG_2_ATI";
+ case 0x0: return "GL_ZERO";
+ case 0x1: return "GL_ONE";
+ default: return "Unknown register\n";
+ }
+}
+
+static unsigned int find_tmpreg(struct texture_stage_op op[8]) {
+ int i;
+ int tex_used[8];
+
+ for(i = 0; i < 8; i++) {
+ if(op[i].carg1 == 0x00000002 ) {
+ tex_used[i] = 1;
+ }
+ }
+
+ for(i = 1; i < 6; i++) {
+ if(!tex_used[i]) {
+ return 0x8921 + i;
+ }
+ }
+ return 0;
+}
+
+extern f(const char*);
+
+void g() {
+ struct texture_stage_op op[8];
+ unsigned int tmparg = find_tmpreg(op);
+ unsigned int dstreg;
+
+ if(tmparg == 0x0) return;
+ dstreg = tmparg;
+ f(debug_register(dstreg));
+ return;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/20071211-1.c b/gcc/testsuite/gcc.c-torture/execute/20071211-1.c
index f3786a2f407..4a4f1fefc90 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20071211-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20071211-1.c
@@ -3,7 +3,11 @@ extern void abort() __attribute__ ((noreturn));
struct s
{
unsigned long long f1 : 40;
+#if(__SIZEOF_INT__ >= 4)
unsigned int f2 : 24;
+#else
+ unsigned long int f2 : 24;
+#endif
} sv;
int main()
diff --git a/gcc/testsuite/gcc.c-torture/execute/20080408-1.c b/gcc/testsuite/gcc.c-torture/execute/20080408-1.c
new file mode 100644
index 00000000000..9e1ff639517
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20080408-1.c
@@ -0,0 +1,11 @@
+extern void abort (void);
+int main ()
+{
+ short ssi = 126;
+ unsigned short usi = 65280;
+ int fail = !(ssi < usi);
+ if (fail)
+ abort ();
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr35163.c b/gcc/testsuite/gcc.c-torture/execute/pr35163.c
index 4950d6d2027..93b180d5d82 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr35163.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr35163.c
@@ -4,7 +4,11 @@ int main()
{
signed char a = -30;
signed char b = -31;
+ #if(__SIZEOF_INT__ >= 4)
if (a > (unsigned short)b)
+#else
+ if ((long) a > (unsigned short)b)
+#endif
abort ();
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/attr-error-1.c b/gcc/testsuite/gcc.dg/attr-error-1.c
new file mode 100644
index 00000000000..c136484a151
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/attr-error-1.c
@@ -0,0 +1,12 @@
+/* PR c/35744 */
+
+typedef char a[N] __attribute__((aligned(4))); /* { dg-error "undeclared" } */
+
+void c[1] __attribute__((vector_size(8))); /* { dg-error "array of voids" } */
+
+void b[1] __attribute__((may_alias)); /* { dg-error "array of voids" } */
+
+struct A
+{
+ void d[1] __attribute__((packed)); /* { dg-error "array of voids" } */
+};
diff --git a/gcc/testsuite/gcc.dg/titype-1.c b/gcc/testsuite/gcc.dg/titype-1.c
index 1d0c570dafa..31c01a681a3 100644
--- a/gcc/testsuite/gcc.dg/titype-1.c
+++ b/gcc/testsuite/gcc.dg/titype-1.c
@@ -1,7 +1,7 @@
/* { dg-do run } */
/* Not all platforms support TImode integers. */
-#if defined(__LP64__) && !defined(__hppa__)
+#if (defined(__LP64__) && !defined(__hppa__)) || defined(_WIN64)
typedef int TItype __attribute__ ((mode (TI)));
#else
typedef long TItype;
diff --git a/gcc/testsuite/gcc.dg/torture/fp-int-convert.h b/gcc/testsuite/gcc.dg/torture/fp-int-convert.h
index c4cb5fbb2d3..8c1968e9be2 100644
--- a/gcc/testsuite/gcc.dg/torture/fp-int-convert.h
+++ b/gcc/testsuite/gcc.dg/torture/fp-int-convert.h
@@ -7,7 +7,7 @@ extern void exit (int);
/* Not all platforms support TImode integers; logic as in
gcc.dg/titype-1.c. */
-#if defined(__LP64__) && !defined(__hppa__)
+#if (defined(__LP64__) && !defined(__hppa__)) || defined(_WIN64)
typedef int TItype __attribute__ ((mode (TI)));
typedef unsigned int UTItype __attribute__ ((mode (TI)));
#else
diff --git a/gcc/testsuite/gcc.dg/torture/pr35400.c b/gcc/testsuite/gcc.dg/torture/pr35400.c
new file mode 100644
index 00000000000..285dc72e3a3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr35400.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-Wtype-limits" } */
+
+struct A
+{
+ struct A *p;
+};
+
+int foo(const struct A *q)
+{
+ return q->p == q;
+}
+
+void bar(int);
+
+void baz()
+{
+ struct A a;
+
+ while (foo(&a))
+ bar(foo(&a));
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr35833.c b/gcc/testsuite/gcc.dg/torture/pr35833.c
new file mode 100644
index 00000000000..2e740f29f84
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr35833.c
@@ -0,0 +1,22 @@
+/* { dg-do run } */
+/* { dg-options "-ftree-vrp" } */
+
+struct S {struct S *field;};
+struct S True, False, Z;
+static inline int f(void) {return 1;}
+static inline int g(struct S **obj) {
+ return f() && *obj == &Z;
+}
+struct S **h(struct S **x) {
+ if (x)
+ return g(x) ? &True.field : &False.field;
+ else
+ return &True.field;
+}
+extern void abort (void);
+int main()
+{
+ if (h(&False.field) != &False.field)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr35842.c b/gcc/testsuite/gcc.dg/torture/pr35842.c
new file mode 100755
index 00000000000..05b26d84c11
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr35842.c
@@ -0,0 +1,12 @@
+/* { dg-do compile { target { *-*-mingw* } } } */
+extern __attribute__((dllimport)) const int SSL_ImplementedCiphers[];
+extern void SSL_GetCipherSuiteInfo(int cipherSuite);
+void nsCipherInfo(int SSL_NumImplementedCiphers)
+{
+ int i;
+ for (i = 0; i < SSL_NumImplementedCiphers; ++i)
+ {
+ const int i_id = SSL_ImplementedCiphers[i];
+ SSL_GetCipherSuiteInfo(i_id);
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/vect/pr35821-altivec.c b/gcc/testsuite/gcc.dg/vect/pr35821-altivec.c
new file mode 100644
index 00000000000..79fa926ec67
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr35821-altivec.c
@@ -0,0 +1,24 @@
+/* { dg-do compile { target { powerpc_altivec_ok } } } */
+
+#include "altivec.h"
+
+void
+foo (float f_gain1, int n_tail, float * __restrict__ f_in_hptr,
+ float * __restrict__ f_out_hptr)
+{
+ int i;
+ vector float *v_f_in_hptr, *v_f_out_hptr;
+
+ f_in_hptr = ( float* )v_f_in_hptr;
+ f_out_hptr = ( float* )v_f_out_hptr;
+
+ for( i = 0 ; i < n_tail ; i++ ) {
+ f_out_hptr[0] = f_in_hptr[0] * f_gain1;
+ f_in_hptr++;
+ f_out_hptr++;
+ }
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
+
diff --git a/gcc/testsuite/gcc.dg/vect/pr35821-spu.c b/gcc/testsuite/gcc.dg/vect/pr35821-spu.c
new file mode 100644
index 00000000000..4cc255f07ee
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr35821-spu.c
@@ -0,0 +1,22 @@
+/* { dg-do compile { target { spu-*-* } } } */
+
+void
+foo (float f_gain1, int n_tail, float * __restrict__ f_in_hptr,
+ float * __restrict__ f_out_hptr)
+{
+ int i;
+ __attribute__((__spu_vector__)) float *v_f_in_hptr, *v_f_out_hptr;
+
+ f_in_hptr = ( float* )v_f_in_hptr;
+ f_out_hptr = ( float* )v_f_out_hptr;
+
+ for( i = 0 ; i < n_tail ; i++ ) {
+ f_out_hptr[0] = f_in_hptr[0] * f_gain1;
+ f_in_hptr++;
+ f_out_hptr++;
+ }
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/pr12329.c b/gcc/testsuite/gcc.target/i386/pr12329.c
new file mode 100644
index 00000000000..aeefeb0ce80
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr12329.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target ilp32 } */
+/* { dg-options "-O2" } */
+
+extern void abort (void);
+
+int test_nested (int i)
+{
+ int __attribute__ ((__noinline__, __regparm__(3))) foo(int j, int k, int l)
+ { /* { dg-error "nested functions are limited to 2 register parameters" } */
+ return i + j + k + l;
+ }
+
+ return foo (i, i+1, i+2);
+}
diff --git a/gcc/testsuite/gcc.target/i386/sse-13.c b/gcc/testsuite/gcc.target/i386/sse-13.c
index aa6bc69e978..e3deeca3549 100644
--- a/gcc/testsuite/gcc.target/i386/sse-13.c
+++ b/gcc/testsuite/gcc.target/i386/sse-13.c
@@ -21,6 +21,12 @@
#define __builtin_ia32_aeskeygenassist128(X, C) __builtin_ia32_aeskeygenassist128(X, 1)
#define __builtin_ia32_pclmulqdq128(X, Y, I) __builtin_ia32_pclmulqdq128(X, Y, 1)
+/* mmintrin-common.h */
+#define __builtin_ia32_roundpd(V, M) __builtin_ia32_roundpd(V, 1)
+#define __builtin_ia32_roundsd(D, V, M) __builtin_ia32_roundsd(D, V, 1)
+#define __builtin_ia32_roundps(V, M) __builtin_ia32_roundps(V, 1)
+#define __builtin_ia32_roundss(D, V, M) __builtin_ia32_roundss(D, V, 1)
+
/* smmintrin.h */
#define __builtin_ia32_pblendw128(X, Y, M) __builtin_ia32_pblendw128 (X, Y, 1)
#define __builtin_ia32_blendps(X, Y, M) __builtin_ia32_blendps(X, Y, 1)
@@ -35,10 +41,6 @@
#define __builtin_ia32_vec_ext_v16qi(X, N) __builtin_ia32_vec_ext_v16qi(X, 1)
#define __builtin_ia32_vec_ext_v4si(X, N) __builtin_ia32_vec_ext_v4si(X, 1)
#define __builtin_ia32_vec_ext_v2di(X, N) __builtin_ia32_vec_ext_v2di(X, 1)
-#define __builtin_ia32_roundpd(V, M) __builtin_ia32_roundpd(V, 1)
-#define __builtin_ia32_roundsd(D, V, M) __builtin_ia32_roundsd(D, V, 1)
-#define __builtin_ia32_roundps(V, M) __builtin_ia32_roundps(V, 1)
-#define __builtin_ia32_roundss(D, V, M) __builtin_ia32_roundss(D, V, 1)
#define __builtin_ia32_mpsadbw128(X, Y, M) __builtin_ia32_mpsadbw128(X, Y, 1)
#define __builtin_ia32_pcmpistrm128(X, Y, M) \
__builtin_ia32_pcmpistrm128(X, Y, 1)
diff --git a/gcc/testsuite/gcc.target/i386/sse-14.c b/gcc/testsuite/gcc.target/i386/sse-14.c
index 264cdb63c66..35db725def8 100644
--- a/gcc/testsuite/gcc.target/i386/sse-14.c
+++ b/gcc/testsuite/gcc.target/i386/sse-14.c
@@ -51,6 +51,12 @@ test_2x (_mm_inserti_si64, __m128i, __m128i, __m128i, 1, 1)
test_1 (_mm_aeskeygenassist_si128, __m128i, __m128i, 1)
test_2 (_mm_clmulepi64_si128, __m128i, __m128i, __m128i, 1)
+/* mmintrin-common.h */
+test_1 (_mm_round_pd, __m128d, __m128d, 1)
+test_1 (_mm_round_ps, __m128, __m128, 1)
+test_2 (_mm_round_sd, __m128d, __m128d, __m128d, 1)
+test_2 (_mm_round_ss, __m128, __m128, __m128, 1)
+
/* smmintrin.h */
test_2 (_mm_blend_epi16, __m128i, __m128i, __m128i, 1)
test_2 (_mm_blend_ps, __m128, __m128, __m128, 1)
diff --git a/gcc/testsuite/gcc.target/mips/scc-2.c b/gcc/testsuite/gcc.target/mips/scc-2.c
new file mode 100644
index 00000000000..7964227a8d7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/scc-2.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-mips-options "-O -mgp64" } */
+
+/* { dg-final { scan-assembler-not "and\t\|andi\t\|ext\t\|sll\t\|srl\t" } } */
+/* { dg-final { scan-assembler-times "slt\t\|sltu\t" 12 } } */
+
+
+#define TEST(N, LHS, REL, RHS) \
+ NOMIPS16 long long w##N (int a, int b) {return LHS REL RHS;} \
+ NOMIPS16 int n##N (long long a, long long b) {return LHS REL RHS;} \
+
+TEST (eq, a, ==, 0);
+TEST (ne, a, !=, 0);
+TEST (gt, a, >, b);
+TEST (ge, a, >=, 1);
+TEST (lt, a, <, b);
+TEST (le, a, <=, 11);
diff --git a/gcc/testsuite/gcc.target/mips/scc-3.c b/gcc/testsuite/gcc.target/mips/scc-3.c
new file mode 100644
index 00000000000..e496d401dd4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/scc-3.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-mips-options "-O -mabi=o64" } */
+
+/* { dg-final { scan-assembler-not "and\t\|andi\t\|ext\t\|sll\t\|srl\t" } } */
+/* { dg-final { scan-assembler-times "slt\t\|sltu\t" 8 } } */
+
+
+#define TEST(N, LHS, REL, RHS) \
+ MIPS16 long long w##N (int a, int b) {return LHS REL RHS;} \
+ MIPS16 int n##N (long long a, long long b) {return LHS REL RHS;} \
+
+TEST (eq, a, ==, 0);
+
+TEST (gt, a, >, b);
+
+TEST (lt, a, <, b);
+TEST (le, a, <=, 11);
diff --git a/gcc/testsuite/gcc.target/mips/scc-4.c b/gcc/testsuite/gcc.target/mips/scc-4.c
new file mode 100644
index 00000000000..fd6e9326789
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/scc-4.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-mips-options "-O -mabi=o64" } */
+
+/* { dg-final { scan-assembler "slt\t" } } */
+/* { dg-final { scan-assembler "sltu\t\|xor\t\|xori\t" } } */
+
+/* This test should work both in mips16 and non-mips16 mode. */
+
+int
+f (long long a, long long b)
+{
+ return a > 5;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/darwin-save-world-1.c b/gcc/testsuite/gcc.target/powerpc/darwin-save-world-1.c
new file mode 100644
index 00000000000..452060e9f61
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/darwin-save-world-1.c
@@ -0,0 +1,18 @@
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-options "-maltivec" } */
+
+/* With altivec turned on, Darwin wants to save the world but we did not mark lr as being saved any more
+ as saving the lr is not needed for saving altivec registers. */
+
+int main (void)
+{
+ __label__ l1;
+ void __attribute__((used)) q(void)
+ {
+ goto l1;
+ }
+
+ l1:;
+ return 0;
+}
diff --git a/gcc/testsuite/gfortran.dg/bind_c_usage_14.f03 b/gcc/testsuite/gfortran.dg/bind_c_usage_14.f03
index abcc46e7e39..2d6726af8ba 100644
--- a/gcc/testsuite/gfortran.dg/bind_c_usage_14.f03
+++ b/gcc/testsuite/gfortran.dg/bind_c_usage_14.f03
@@ -81,24 +81,24 @@ end subroutine sub6NoIso
! The subroutines (including entry) should have
! only a char-length parameter if they are not bind(C).
!
-! { dg-final { scan-tree-dump "sub1noiso .a, b, _a, _b\\)" "original" } }
-! { dg-final { scan-tree-dump "sub2 .a, b\\)" "original" } }
-! { dg-final { scan-tree-dump "sub3noiso .a, b, _a, _b\\)" "original" } }
-! { dg-final { scan-tree-dump "sub3noisoentry .x, y, z, _x, _z\\)" "original" } }
-! { dg-final { scan-tree-dump "sub4iso .a, b\\)" "original" } }
-! { dg-final { scan-tree-dump "sub4isoentry .x, y, z, _x, _z\\)" "original" } }
-! { dg-final { scan-tree-dump "sub5iso .a, b\\)" "original" } }
-! { dg-final { scan-tree-dump "sub5noisoentry .x, y, z, _x, _z\\)" "original" } }
-! { dg-final { scan-tree-dump "sub6noiso .a, b, _a, _b\\)" "original" } }
-! { dg-final { scan-tree-dump "sub6isoentry .x, y, z, _x, _z\\)" "original" } }
+! { dg-final { scan-tree-dump "sub1noiso \\(\[^.\]*a, \[^.\]*b, \[^.\]*_a, \[^.\]*_b\\)" "original" } }
+! { dg-final { scan-tree-dump "sub2 \\(\[^.\]*a, \[^.\]*b\\)" "original" } }
+! { dg-final { scan-tree-dump "sub3noiso \\(\[^.\]*a, \[^.\]*b, \[^.\]*_a, \[^.\]*_b\\)" "original" } }
+! { dg-final { scan-tree-dump "sub3noisoentry \\(\[^.\]*x, \[^.\]*y, \[^.\]*z, \[^.\]*_x, \[^.\]*_z\\)" "original" } }
+! { dg-final { scan-tree-dump "sub4iso \\(\[^.\]*a, \[^.\]*b\\)" "original" } }
+! { dg-final { scan-tree-dump "sub4isoentry \\(\[^.\]*x, \[^.\]*y, \[^.\]*z, \[^.\]*_x, \[^.\]*_z\\)" "original" } }
+! { dg-final { scan-tree-dump "sub5iso \\(\[^.\]*a, \[^.\]*b\\)" "original" } }
+! { dg-final { scan-tree-dump "sub5noisoentry \\(\[^.\]*x, \[^.\]*y, \[^.\]*z, \[^.\]*_x, \[^.\]*_z\\)" "original" } }
+! { dg-final { scan-tree-dump "sub6noiso \\(\[^.\]*a, \[^.\]*b, \[^.\]*_a, \[^.\]*_b\\)" "original" } }
+! { dg-final { scan-tree-dump "sub6isoentry \\(\[^.\]*x, \[^.\]*y, \[^.\]*z, \[^.\]*_x, \[^.\]*_z\\)" "original" } }
! The master functions should have always a length parameter
! to ensure sharing a parameter between bind(C) and non-bind(C) works
!
-! { dg-final { scan-tree-dump "master.0.sub3noiso .__entry, z, y, x, b, a, _z, _x, _b, _a\\)" "original" } }
-! { dg-final { scan-tree-dump "master.1.sub4iso .__entry, z, y, x, b, a, _z, _x, _b, _a\\)" "original" } }
-! { dg-final { scan-tree-dump "master.2.sub5iso .__entry, z, y, x, b, a, _z, _x, _b, _a\\)" "original" } }
-! { dg-final { scan-tree-dump "master.3.sub6noiso .__entry, z, y, x, b, a, _z, _x, _b, _a\\)" "original" } }
+! { dg-final { scan-tree-dump "master.0.sub3noiso \\(\[^.\]*__entry, \[^.\]*z, \[^.\]*y, \[^.\]*x, \[^.\]*b, \[^.\]*a, \[^.\]*_z, \[^.\]*_x, \[^.\]*_b, \[^.\]*_a\\)" "original" } }
+! { dg-final { scan-tree-dump "master.1.sub4iso \\(\[^.\]*__entry, \[^.\]*z, \[^.\]*y, \[^.\]*x, \[^.\]*b, \[^.\]*a, \[^.\]*_z, \[^.\]*_x, \[^.\]*_b, \[^.\]*_a\\)" "original" } }
+! { dg-final { scan-tree-dump "master.2.sub5iso \\(\[^.\]*__entry, \[^.\]*z, \[^.\]*y, \[^.\]*x, \[^.\]*b, \[^.\]*a, \[^.\]*_z, \[^.\]*_x, \[^.\]*_b, \[^.\]*_a\\)" "original" } }
+! { dg-final { scan-tree-dump "master.3.sub6noiso \\(\[^.\]*__entry, \[^.\]*z, \[^.\]*y, \[^.\]*x, \[^.\]*b, \[^.\]*a, \[^.\]*_z, \[^.\]*_x, \[^.\]*_b, \[^.\]*_a\\)" "original" } }
! Thus, the master functions need to be called with length arguments
! present
diff --git a/gcc/testsuite/gfortran.dg/continuation_10.f90 b/gcc/testsuite/gfortran.dg/continuation_10.f90
new file mode 100644
index 00000000000..8071dd7b695
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/continuation_10.f90
@@ -0,0 +1,55 @@
+! { dg-do compile }
+! { dg-options -std=f95 }
+! PR35882 Miscounted continuation lines when interspersed with data
+program test_mod
+ implicit none
+
+ integer, dimension(50) :: array
+
+ array = 1
+
+ print "(a, i8)", &
+ "Line 1", &
+ array(2), &
+ "Line 3", &
+ array(4), &
+ "Line 5", &
+ array(6), &
+ "Line 7", &
+ array(8), &
+ "Line 9", &
+ array(10), &
+ "Line 11", &
+ array(12), &
+ "Line 13", &
+ array(14), &
+ "Line 15", &
+ array(16), &
+ "Line 17", &
+ array(18), &
+ "Line 19", &
+ array(20), &
+ "Line 21", &
+ array(22), &
+ "Line 23", &
+ array(24), &
+ "Line 25", &
+ array(26), &
+ "Line 27", &
+ array(28), &
+ "Line 29", &
+ array(30), &
+ "Line 31", &
+ array(32), &
+ "Line 33", &
+ array(34), &
+ "Line 35", &
+ array(36), &
+ "Line 37", &
+ array(38), &
+ "Line 39", &
+ array(40), & ! { dg-warning "Limit of 39 continuations exceeded" }
+ "Line 41", &
+ array(42), &
+ "Line 43"
+end program
diff --git a/gcc/testsuite/gfortran.dg/continuation_3.f90 b/gcc/testsuite/gfortran.dg/continuation_3.f90
index a7f0d1d1dd1..238f8cc7b8f 100644
--- a/gcc/testsuite/gfortran.dg/continuation_3.f90
+++ b/gcc/testsuite/gfortran.dg/continuation_3.f90
@@ -1,5 +1,5 @@
! { dg-do compile }
-! { dg-options -pedantic }
+! { dg-options -std=f95 }
! PR 19262 Test limit on line continuations. Test case derived form case in PR
! by Steve Kargl. Submitted by Jerry DeLisle <jvdelisle@gcc.gnu.org>
print *, &
diff --git a/gcc/testsuite/gfortran.dg/continuation_5.f b/gcc/testsuite/gfortran.dg/continuation_5.f
index b0ecd706390..15e06077ff3 100644
--- a/gcc/testsuite/gfortran.dg/continuation_5.f
+++ b/gcc/testsuite/gfortran.dg/continuation_5.f
@@ -1,5 +1,5 @@
! { dg-do compile }
-! { dg-options -pedantic }
+! { dg-options -std=f95 }
! PR 19262 Test limit on line continuations. Test case derived form case in PR
! by Steve Kargl. Submitted by Jerry DeLisle <jvdelisle@gcc.gnu.org>
print *,
diff --git a/gcc/testsuite/gfortran.dg/f2003_io_1.f03 b/gcc/testsuite/gfortran.dg/f2003_io_1.f03
new file mode 100644
index 00000000000..6ec14aa053f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/f2003_io_1.f03
@@ -0,0 +1,37 @@
+! { dg-do run }
+! { dg-options "-std=gnu" }
+! Test case prepared by Jerry DeLisle <jvdelisle@gcc.gnu.org>
+real :: a(4), b(4)
+real :: c
+integer :: istat, j
+character(25) :: msg
+
+a = 23.45
+b = 0.0
+open(10, file='mydata', asynchronous="yes", blank="null")
+
+write(10,'(10f8.3)', asynchronous="yes", decimal="comma", id=j) a
+rewind(10)
+read(10,'(10f8.3)', asynchronous="yes", decimal="comma", blank="zero") b
+if (any(b.ne.23.45)) call abort
+
+c = 3.14
+write(msg, *, decimal="comma") c
+if (msg(1:7).ne." 3,14") call abort
+
+b = 0.0
+rewind(10)
+write(10,'(10f8.3)', asynchronous="yes", decimal="point") a
+rewind(10)
+read(10,'(10f8.3)', asynchronous="yes", decimal="point") b
+if (any(b.ne.23.45)) call abort
+
+wait(unit=10, err=25, iostat=istat, iomsg=msg, end=35, id=j)
+
+! do some stuff with a
+25 continue
+
+35 continue
+
+close(10, status="delete")
+end
diff --git a/gcc/testsuite/gfortran.dg/f2003_io_2.f03 b/gcc/testsuite/gfortran.dg/f2003_io_2.f03
new file mode 100644
index 00000000000..54c0516dfed
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/f2003_io_2.f03
@@ -0,0 +1,22 @@
+! { dg-do compile }
+! { dg-options "-std=f2003" }
+! Test case prepared by Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+integer :: istat, idvar
+character(25) :: msg
+real, dimension(10) :: a, b
+
+a = 43.21
+open(10, file='mydata', asynchronous="yes")
+write(10,'(10f8.3)', asynchronous="yes", decimal="comma") a
+rewind(10)
+read(10,'(10f8.3)', asynchronous="yes", decimal="comma", id=idvar) b
+istat = 123456
+wait(unit=10, err=25, iostat=istat, iomsg=msg, end=35, id=idvar)
+
+print *, istat
+
+25 continue
+
+35 continue
+end
diff --git a/gcc/testsuite/gfortran.dg/f2003_io_3.f03 b/gcc/testsuite/gfortran.dg/f2003_io_3.f03
new file mode 100644
index 00000000000..5b3fb59b0d7
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/f2003_io_3.f03
@@ -0,0 +1,21 @@
+! { dg-do compile }
+! { dg-options "-std=f2003" }
+! Test case prepared by Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+integer :: istat
+character(25) :: msg
+real, dimension(10) :: a, b
+namelist /mynml/ a, b
+msg = "null"
+a = 43.21
+WRITE(99,'(10f8.3)',decimal="comma") a
+rewind(99)
+read(99,'(dc,10f8.3)',blank=msg) b
+write(99,'(dp,10f8.3)',round="up") ! { dg-error "not implemented" }
+rewind(99)
+read(99,'(10f8.3)',pad="yes")
+msg="suppress"
+write(99,'(10f8.3)',sign=msg)
+write(99,delim="apostrophe", fmt=*)
+write(99,nml=mynml,delim="none")
+end
diff --git a/gcc/testsuite/gfortran.dg/f2003_io_4.f03 b/gcc/testsuite/gfortran.dg/f2003_io_4.f03
new file mode 100644
index 00000000000..d253a81bb64
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/f2003_io_4.f03
@@ -0,0 +1,33 @@
+! { dg-do run }
+! Test case prepared by Jerry DeLisle <jvdelisle@gcc.gnu.org>
+! Test of decimal= feature
+
+integer :: istat
+character(80) :: msg
+real, dimension(4) :: a, b, c
+namelist /mynml/ a, b
+msg = "yes"
+a = 43.21
+b = 3.131
+c = 5.432
+open(99, decimal="comma")
+write(99,'(10f8.3)') a
+a = 0.0
+rewind(99)
+read(99,'(10f8.3)') a
+if (any(a.ne.43.21)) call abort
+
+write(msg,'(dp,f8.3,dc,f8.2,dp,f8.3)', decimal="comma") a(1), b(1), c(1)
+if (trim(msg).ne." 43.210 3,13 5.432") call abort
+
+close(99, status="delete")
+open(99, decimal="comma")
+write(99,nml=mynml)
+a = 0.0
+b = 0.0
+rewind(99)
+read(99,nml=mynml)
+if (any(a.ne.43.21)) call abort
+if (any(b.ne.3.131)) call abort
+close(99, status="delete")
+end
diff --git a/gcc/testsuite/gfortran.dg/f2003_io_5.f03 b/gcc/testsuite/gfortran.dg/f2003_io_5.f03
new file mode 100644
index 00000000000..b816ded69c5
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/f2003_io_5.f03
@@ -0,0 +1,26 @@
+! { dg-do run }
+! Test case prepared by Jerry DeLisle <jvdelisle@gcc.gnu.org>
+! Test of decimal="comma" in namelist and complex
+integer :: i
+real :: a(10) = [ (i*1.3, i=1,10) ]
+real :: b(10)
+complex :: c
+character(34) :: complex
+namelist /nm/ a
+
+open(99,file="mynml",form="formatted",decimal="point",status="replace")
+write(99,nml=nm,decimal="comma")
+a = 5.55
+rewind(99)
+read(99,nml=nm,decimal="comma")
+if (any (a /= [ (i*1.3, i=1,10) ])) call abort
+close(99, status="delete")
+
+c = (3.123,4.456)
+write(complex,*,decimal="comma") c
+if (complex.ne." ( 3,1229999 ; 4,4559999 )") call abort
+c = (0.0, 0.0)
+read(complex,*,decimal="comma") c
+if (complex.ne." ( 3,1229999 ; 4,4559999 )") call abort
+
+end
diff --git a/gcc/testsuite/gfortran.dg/f2003_io_6.f03 b/gcc/testsuite/gfortran.dg/f2003_io_6.f03
new file mode 100644
index 00000000000..40758e2232d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/f2003_io_6.f03
@@ -0,0 +1,11 @@
+! { dg-do run }
+! Test case prepared by Jerry DeLisle <jvdelisle@gcc.gnu.org>
+! Test of decimal="comma" in namelist, checks separators
+implicit none
+integer :: i
+real :: a(6) = 0.0
+character(len=30) :: str = '&nm a = 1,3; 4, 5; 5; 7; /'
+namelist /nm/ a
+read(str,nml=nm,decimal='comma')
+if (any(a.ne.[ 1.3, 4.0, 5.0, 5.0, 7.0, 0.0 ])) call abort
+end
diff --git a/gcc/testsuite/gfortran.dg/f2003_io_7.f03 b/gcc/testsuite/gfortran.dg/f2003_io_7.f03
new file mode 100644
index 00000000000..6d2c11dfcbe
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/f2003_io_7.f03
@@ -0,0 +1,27 @@
+! { dg-do run }
+! Test case prepared by Jerry DeLisle <jvdelisle@gcc.gnu.org>
+! Test of sign=, decimal=, and blank= .
+program iotests
+ implicit none
+ character(len=45) :: a
+ character(len=4) :: mode = "what"
+ real, parameter :: pi = 3.14159265358979323846
+ real(kind=8), dimension(3) :: b
+ !
+ write(a,'(f10.3,s,f10.3,sp,f10.3,ss,f10.3)',SIGN='PLUS') pi, pi, pi, pi
+ if (a /= " +3.142 3.142 +3.142 3.142") call abort
+ !
+ open(8,sign="plus")
+ write(8,'(f10.3,dc,f10.3,dp,f10.3)',DECIMAL='COMMA',&
+ & sign="suppress") pi, pi, pi
+ rewind(8)
+ read(8,'(a)') a
+ if (a /= " 3,142 3,142 3.142") call abort
+ close(8,status="delete")
+ !
+ ! "123456789 123456789 12345678901
+ write(a,'(a)') "53 256.84, 2 2 2. ; 33.3 3 1 "
+ read(a, '(f9.2,1x,f8.2,2x,f11.7)', blank="zero") b(1),b(2),b(3)
+ if (any(abs(b - [530256.84, 20202.00, 33.3030001]) > .03)) call abort
+end program iotests
+
diff --git a/gcc/testsuite/gfortran.dg/f2003_io_8.f03 b/gcc/testsuite/gfortran.dg/f2003_io_8.f03
new file mode 100644
index 00000000000..2362697c6bb
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/f2003_io_8.f03
@@ -0,0 +1,13 @@
+! { dg-do compile }
+! { dg-options "-std=gnu" }
+!
+real :: a(4), b(4)
+real :: c
+integer :: istat, j
+character(25) :: msg
+
+open(10, file='mydata', asynchronous="yes", blank="null")
+write(10,'(10f8.3)', asynchronous='no', decimal="comma", id=j) a ! { dg-error "must be with ASYNCHRONOUS=" }
+read(10,'(10f8.3)', id=j, decimal="comma", blank="zero") b ! { dg-error "must be with ASYNCHRONOUS=" }
+read(10,'(10f8.3)', asynchronous=msg, decimal="comma", blank="zero") b ! { dg-error "must be an initialization expression" }
+end
diff --git a/gcc/testsuite/gfortran.dg/internal_pack_1.f90 b/gcc/testsuite/gfortran.dg/internal_pack_1.f90
index 6c3781ba9b2..aded78dc26a 100644
--- a/gcc/testsuite/gfortran.dg/internal_pack_1.f90
+++ b/gcc/testsuite/gfortran.dg/internal_pack_1.f90
@@ -11,6 +11,11 @@ program main
real(kind=8), dimension(3) :: r8
complex(kind=4), dimension(3) :: c4
complex(kind=8), dimension(3) :: c8
+ type i8_t
+ sequence
+ integer(kind=8) :: v
+ end type i8_t
+ type(i8_t), dimension(3) :: d_i8
i1 = (/ -1, 1, -3 /)
call sub_i1(i1(1:3:2))
@@ -46,6 +51,10 @@ program main
if (any(real(c8) /= (/ 3.0_4, 1.0_4, 2.0_4/))) call abort
if (any(aimag(c8) /= 0._4)) call abort
+ d_i8%v = (/ -1, 1, -3 /)
+ call sub_d_i8(d_i8(1:3:2))
+ if (any(d_i8%v /= (/ 3, 1, 2 /))) call abort
+
end program main
subroutine sub_i1(i)
@@ -113,3 +122,15 @@ subroutine sub_c4(r)
r(1) = 3._4
r(2) = 2._4
end subroutine sub_c4
+
+subroutine sub_d_i8(i)
+ type i8_t
+ sequence
+ integer(kind=8) :: v
+ end type i8_t
+ type(i8_t), dimension(2) :: i
+ if (i(1)%v /= -1) call abort
+ if (i(2)%v /= -3) call abort
+ i(1)%v = 3
+ i(2)%v = 2
+end subroutine sub_d_i8
diff --git a/gcc/testsuite/gfortran.dg/intrinsic_pack_1.f90 b/gcc/testsuite/gfortran.dg/intrinsic_pack_1.f90
index e464503c963..22d110ba77c 100644
--- a/gcc/testsuite/gfortran.dg/intrinsic_pack_1.f90
+++ b/gcc/testsuite/gfortran.dg/intrinsic_pack_1.f90
@@ -29,6 +29,34 @@ program main
integer(kind=8), dimension(9) :: vi8
integer(kind=8), dimension(9) :: ri8
+ type i1_t
+ integer(kind=1) :: v
+ end type i1_t
+ type(i1_t), dimension(3,3) :: d_i1
+ type(i1_t), dimension(9) :: d_vi1
+ type(i1_t), dimension(9) :: d_ri1
+
+ type i4_t
+ integer(kind=4) :: v
+ end type i4_t
+ type(i4_t), dimension(3,3) :: d_i4
+ type(i4_t), dimension(9) :: d_vi4
+ type(i4_t), dimension(9) :: d_ri4
+
+ d_vi1%v = (/(i+10,i=1,9)/)
+ d_i1%v = reshape((/1_1, -1_1, 2_1, -2_1, 3_1, -3_1, 4_1, &
+ & -4_1, 5_1/), shape(i1))
+ d_ri1 = pack(d_i1,d_i1%v>0,d_vi1)
+ if (any(d_ri1%v /= (/1_1, 2_1, 3_1, 4_1, 5_1, 16_1, 17_1, 18_1, 19_1/))) &
+ & call abort
+
+ d_vi4%v = (/(i+10,i=1,9)/)
+ d_i4%v = reshape((/1_4, -1_4, 2_4, -2_4, 3_4, -3_4, 4_4, &
+ & -4_4, 5_4/), shape(d_i4))
+ d_ri4 = pack(d_i4,d_i4%v>0,d_vi4)
+ if (any(d_ri4%v /= (/1_4, 2_4, 3_4, 4_4, 5_4, 16_4, 17_4, 18_4, 19_4/))) &
+ & call abort
+
vr4 = (/(i+10,i=1,9)/)
r4 = reshape((/1.0_4, -3.0_4, 2.1_4, -4.21_4, 1.2_4, 0.98_4, -1.2_4, &
& -7.1_4, -9.9_4, 0.3_4 /), shape(r4))
diff --git a/gcc/testsuite/gfortran.dg/intrinsic_spread_1.f90 b/gcc/testsuite/gfortran.dg/intrinsic_spread_1.f90
index 1fe09d478bb..04e4c577ac6 100644
--- a/gcc/testsuite/gfortran.dg/intrinsic_spread_1.f90
+++ b/gcc/testsuite/gfortran.dg/intrinsic_spread_1.f90
@@ -25,6 +25,14 @@ program foo
complex(kind=8), dimension (10) :: c_8
complex(kind=8), dimension (2, 3) :: ac_8
complex(kind=8), dimension (2, 2, 3) :: bc_8
+ type i4_t
+ integer(kind=4) :: v
+ end type i4_t
+ type(i4_t), dimension (10) :: it_4
+ type(i4_t), dimension (2, 3) :: at_4
+ type(i4_t), dimension (2, 2, 3) :: bt_4
+ type(i4_t) :: iv_4
+
character (len=200) line1, line2, line3
a_1 = reshape ((/1_1, 2_1, 3_1, 4_1, 5_1, 6_1/), (/2, 3/))
@@ -159,6 +167,17 @@ program foo
c_8 = spread((1._8,-1._8),1,10)
if (any(c_8 /= (1._8,-1._8))) call abort
+
+ at_4%v = reshape ((/1_4, 2_4, 3_4, 4_4, 5_4, 6_4/), (/2, 3/))
+ bt_4 = spread (at_4, 1, 2)
+ if (any (bt_4%v .ne. reshape ((/1_4, 1_4, 2_4, 2_4, 3_4, 3_4, 4_4, &
+ & 4_4, 5_4, 5_4, 6_4, 6_4/), (/2, 2, 3/)))) &
+ call abort
+ iv_4%v = 123_4
+ it_4 = spread(iv_4,1,10)
+ if (any(it_4%v /= 123_4)) call abort
+
+
9000 format(12I3)
9010 format(12F7.3)
9020 format(25F7.3)
diff --git a/gcc/testsuite/gfortran.dg/intrinsic_unpack_1.f90 b/gcc/testsuite/gfortran.dg/intrinsic_unpack_1.f90
index 71cce798ca5..47b9aef2e3f 100644
--- a/gcc/testsuite/gfortran.dg/intrinsic_unpack_1.f90
+++ b/gcc/testsuite/gfortran.dg/intrinsic_unpack_1.f90
@@ -10,6 +10,12 @@ program intrinsic_unpack
real(kind=8), dimension(3,3) :: ar8, br8
complex(kind=4), dimension(3,3) :: ac4, bc4
complex(kind=8), dimension(3,3) :: ac8, bc8
+ type i4_t
+ integer(kind=4) :: v
+ end type i4_t
+ type(i4_t), dimension(3,3) :: at4, bt4
+ type(i4_t), dimension(3) :: vt4
+
logical, dimension(3, 3) :: mask
character(len=500) line1, line2
integer i
@@ -116,4 +122,14 @@ program intrinsic_unpack
mask, ac8)
if (line1 .ne. line2) call abort
+ at4%v = reshape ((/1, 0, 0, 0, 1, 0, 0, 0, 1/), (/3, 3/));
+ vt4%v = (/2_4, 3_4, 4_4/)
+ bt4 = unpack (vt4, mask, at4)
+ if (any (bt4%v .ne. reshape ((/1, 2, 0, 3, 1, 0, 0, 0, 4/), (/3, 3/)))) &
+ call abort
+ bt4%v = -1
+ bt4 = unpack (vt4, mask, i4_t(0_4))
+ if (any (bt4%v .ne. reshape ((/0, 2, 0, 3, 0, 0, 0, 0, 4/), (/3, 3/)))) &
+ call abort
+
end program
diff --git a/gcc/testsuite/gfortran.dg/io_constraints_1.f90 b/gcc/testsuite/gfortran.dg/io_constraints_1.f90
index 05f52faae76..5f2c776b128 100644
--- a/gcc/testsuite/gfortran.dg/io_constraints_1.f90
+++ b/gcc/testsuite/gfortran.dg/io_constraints_1.f90
@@ -62,7 +62,7 @@ end module global
!Was correctly picked up before patch.
write(1, fmt='(i6)', eor = 100) a ! { dg-error "EOR tag" }
!Was correctly picked up before patch.
- write(1, fmt='(i6)', size = b) a ! { dg-error "SIZE=specifier not allowed" }
+ write(1, fmt='(i6)', size = b) a ! { dg-error "SIZE= specifier not allowed" }
READ(1, fmt='(i6)', end = 900) a ! { dg-error "not defined" }
diff --git a/gcc/testsuite/gfortran.dg/io_constraints_2.f90 b/gcc/testsuite/gfortran.dg/io_constraints_2.f90
index fa6cbdbca6b..8bf48d72ff2 100644
--- a/gcc/testsuite/gfortran.dg/io_constraints_2.f90
+++ b/gcc/testsuite/gfortran.dg/io_constraints_2.f90
@@ -66,7 +66,7 @@ end module global
READ(1, fmt='(i6)', advance='NO', size = buffer) a ! { dg-error "INTEGER" }
!Was correctly picked up before patch. -correct syntax error
- READ(1, fmt='(i6)', advance='YES', size = 10) a ! { dg-error "Syntax error" }
+ READ(1, fmt='(i6)', advance='YES', size = 10) a ! { dg-error "Invalid value for SIZE specification" }
READ(1, fmt='(i6)', advance='MAYBE') ! { dg-error "YES or NO" }
diff --git a/gcc/testsuite/gfortran.dg/namelist_47.f90 b/gcc/testsuite/gfortran.dg/namelist_47.f90
new file mode 100644
index 00000000000..bc9110fa3cd
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/namelist_47.f90
@@ -0,0 +1,52 @@
+! { dg-do run }
+
+module nml_47
+ type :: mt
+ character(len=2) :: c012345678901234567890123456789012345678901234567890123456789h(2) = (/"aa","bb"/)
+ end type mt
+ type :: bt
+ integer :: i(2) = (/1,2/)
+ type(mt) :: m(2)
+ end type bt
+end module nml_47
+
+program namelist_47
+ use nml_47
+ type(bt) :: x(2)
+ character(140) :: teststring
+ namelist /mynml/ x
+
+ teststring = " x(2)%m%c012345678901234567890123456789012345678901234567890123456789h(:)(2:2) = 'z','z',"
+ call writenml (teststring)
+ teststring = " x(2)%m(2)%c012345678901234567890123456789012345678901234567890123456789h(:)(2) = 'z','z',"
+ call writenml (teststring)
+ teststring = " x(2)%m(2)%c012345678901234567890123456789012345678901234567890123456789h(:)(:3) = 'z','z',"
+ call writenml (teststring)
+ teststring = " x(2)%m(2)%c012345678901234567890123456789012345678901234567890123456789h(1:2)(k:) = 'z','z',"
+ call writenml (teststring)
+
+contains
+
+subroutine writenml (astring)
+ character(140), intent(in) :: astring
+ character(300) :: errmessage
+ integer :: ierror
+
+ open (10, status="scratch", delim='apostrophe')
+ write (10, '(A)') "&MYNML"
+ write (10, '(A)') astring
+ write (10, '(A)') "/"
+ rewind (10)
+ read (10, nml = mynml, iostat=ierror, iomsg=errmessage)
+ if (ierror == 0) call abort
+ print '(a)', trim(errmessage)
+ close (10)
+
+end subroutine writenml
+
+end program namelist_47
+! { dg-output "Multiple sub-objects with non-zero rank in namelist object x(\n|\r\n|\r)" }
+! { dg-output "Missing colon in substring qualifier for namelist variable x%m%c012345678901234567890123456789012345678901234567890123456789h(\n|\r\n|\r)" }
+! { dg-output "Substring out of range for namelist variable x%m%c012345678901234567890123456789012345678901234567890123456789h(\n|\r\n|\r)" }
+! { dg-output "Bad character in substring qualifier for namelist variable x%m%c012345678901234567890123456789012345678901234567890123456789h(\n|\r\n|\r)" }
+! { dg-final { cleanup-modules "nml_47" } }
diff --git a/gcc/testsuite/gfortran.dg/simplify_argN_1.f90 b/gcc/testsuite/gfortran.dg/simplify_argN_1.f90
new file mode 100644
index 00000000000..933b1f32af7
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/simplify_argN_1.f90
@@ -0,0 +1,26 @@
+! { dg-do run }
+! Tests the fix for PR35780, in which the assignment for C was not
+! scalarized in expr.c.
+!
+! Contributed by Dick Hendrickson <dick.hendrickson@gmail.com>
+!
+MODULE MODS
+ integer, parameter :: N = 10
+ INTEGER, PARAMETER, DIMENSION(N) :: A = [(i, i = 1, N)]
+ INTEGER, PARAMETER, DIMENSION(N) :: B = [(i - 5, i = 1, N)]
+ INTEGER, PARAMETER, DIMENSION(N) :: C = ISHFTC(3, B, 5) !ICE
+ INTEGER, PARAMETER, DIMENSION(N) :: D = ISHFTC(A, 3, 5) ! OK
+ INTEGER, PARAMETER, DIMENSION(N) :: E = ISHFTC(A, B, 5) ! OK
+
+END MODULE MODS
+
+ use mods
+ integer, dimension(N) :: X = A
+ integer, dimension(N) :: Y = B
+
+! Check the simplifed expressions against the library
+ if (any (ISHFTC(3, Y, 5) /= C)) call abort ()
+ if (any (ISHFTC(X, 3, 5) /= D)) call abort ()
+ if (any (ISHFTC(X, Y, 5) /= E)) call abort ()
+end
+! { dg-final { cleanup-modules "mods" } }
diff --git a/gcc/testsuite/gfortran.dg/write_check2.f90 b/gcc/testsuite/gfortran.dg/write_check2.f90
index 52f32bb121c..1447f8d14f9 100644
--- a/gcc/testsuite/gfortran.dg/write_check2.f90
+++ b/gcc/testsuite/gfortran.dg/write_check2.f90
@@ -4,7 +4,7 @@
character(len=20) :: str
write(13,'(a)',advance='yes') 'Hello:'
write(13,'(a)',advance='no') 'Hello:'
- write(13,'(a)',advance='y') 'Hello:' ! { dg-error "ADVANCE=specifier at \\(1\\) must have value = YES or NO." }
- write(13,'(a)',advance='yet') 'Hello:' ! { dg-error "ADVANCE=specifier at \\(1\\) must have value = YES or NO." }
- write(13,'(a)',advance='yess') 'Hello:' ! { dg-error "ADVANCE=specifier at \\(1\\) must have value = YES or NO." }
+ write(13,'(a)',advance='y') 'Hello:' ! { dg-error "ADVANCE= specifier at \\(1\\) must have value = YES or NO." }
+ write(13,'(a)',advance='yet') 'Hello:' ! { dg-error "ADVANCE= specifier at \\(1\\) must have value = YES or NO." }
+ write(13,'(a)',advance='yess') 'Hello:' ! { dg-error "ADVANCE= specifier at \\(1\\) must have value = YES or NO." }
end
diff --git a/gcc/testsuite/gnat.dg/ancestor_type.adb b/gcc/testsuite/gnat.dg/ancestor_type.adb
new file mode 100644
index 00000000000..b5e9e2c5c1d
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/ancestor_type.adb
@@ -0,0 +1,13 @@
+-- { dg-do compile }
+
+package body Ancestor_Type is
+
+ package body B is
+ function make return T is
+ begin
+ return (T with n => 0); -- { dg-error "expect ancestor" }
+ end make;
+
+ end B;
+
+end Ancestor_Type;
diff --git a/gcc/testsuite/gnat.dg/ancestor_type.ads b/gcc/testsuite/gnat.dg/ancestor_type.ads
new file mode 100644
index 00000000000..2ed1f19c2c8
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/ancestor_type.ads
@@ -0,0 +1,13 @@
+package Ancestor_Type is
+
+ type T is tagged private;
+
+ package B is
+ function make return T;
+ end B;
+
+private
+ type T is tagged record
+ n: Natural;
+ end record;
+end Ancestor_Type;
diff --git a/gcc/testsuite/gnat.dg/array4.adb b/gcc/testsuite/gnat.dg/array4.adb
new file mode 100644
index 00000000000..048698a54e1
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/array4.adb
@@ -0,0 +1,37 @@
+-- { dg-do run }
+
+procedure Array4 is
+
+ type A is array (1..5) of Integer;
+ f : constant A := (1, 2, 3, 4, 5);
+
+ i1 : integer renames f(1);
+ i2 : integer renames f(2);
+ i3 : integer renames f(3);
+ i4 : integer renames f(4);
+ i5 : integer renames f(5);
+
+ procedure Link_Failure;
+ pragma Import (C, Link_Failure);
+
+begin
+ if i1 /= 1 then
+ Link_Failure;
+ end if;
+
+ if i2 /= 2 then
+ Link_Failure;
+ end if;
+
+ if i3 /= 3 then
+ Link_Failure;
+ end if;
+
+ if i4 /= 4 then
+ Link_Failure;
+ end if;
+
+ if i5 /= 5 then
+ Link_Failure;
+ end if;
+end;
diff --git a/gcc/testsuite/gnat.dg/deep_old.adb b/gcc/testsuite/gnat.dg/deep_old.adb
new file mode 100644
index 00000000000..6aca027f4ac
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/deep_old.adb
@@ -0,0 +1,8 @@
+procedure Deep_Old (X : Integer) is
+begin
+ begin
+ if X = X'Old then
+ null;
+ end if;
+ end;
+end Deep_Old;
diff --git a/gcc/testsuite/gnat.dg/loop_address2.adb b/gcc/testsuite/gnat.dg/loop_address2.adb
new file mode 100644
index 00000000000..aa955d771b2
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/loop_address2.adb
@@ -0,0 +1,26 @@
+-- { dg-do compile }
+-- { dg-options "-O" }
+
+with System, Ada.Unchecked_Conversion;
+with System.Storage_Elements; use System.Storage_Elements;
+
+procedure Loop_Address2 is
+
+ type Ptr is access all Integer;
+
+ function To_Ptr is new Ada.Unchecked_Conversion (System.Address, Ptr);
+
+ function F (BM : System.Address; I : Integer) return System.Address is
+ begin
+ return BM + Storage_Offset (4*I);
+ end;
+
+ B : Integer;
+ P : Ptr;
+
+begin
+ for I in 0 .. 2 loop
+ P := To_Ptr (F (B'Address, I));
+ P.all := 0;
+ end loop;
+end ;
diff --git a/gcc/testsuite/gnat.dg/pack5.adb b/gcc/testsuite/gnat.dg/pack5.adb
new file mode 100644
index 00000000000..12bea11a311
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/pack5.adb
@@ -0,0 +1,32 @@
+-- { dg-do compile }
+
+procedure Pack5 is
+
+ type Kind is (v1, v2, v3);
+
+ type Error (k : Kind := Kind'First) is record
+ case k is
+ when v1 =>
+ null;
+ when v2 =>
+ null;
+ when Others =>
+ B : Boolean;
+ end case;
+ end record;
+ pragma Pack (Error);
+ for Error'Size use 16;
+
+ No_Error: constant Error := (k => v2);
+
+ type R (B : Boolean) is record
+ E : Error;
+ end record;
+ pragma Pack(R);
+ type Ptr is access R;
+
+ C : Ptr := new R (True);
+
+begin
+ C.E := No_Error;
+end;
diff --git a/gcc/testsuite/gnat.dg/pack6.adb b/gcc/testsuite/gnat.dg/pack6.adb
new file mode 100644
index 00000000000..d846ed12ce0
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/pack6.adb
@@ -0,0 +1,27 @@
+-- { dg-do compile }
+-- { dg-options "-gnatws" }
+
+procedure Pack6 is
+
+ type R is record
+ I : Integer;
+ a, b, c, d, e : Character;
+ end record;
+
+ type Ar1 is array (1..4) of R;
+ type Ar2 is array (1..4) of R;
+ pragma Pack (Ar2);
+
+ type R2 is record
+ A : Ar2;
+ end record;
+ for R2 use record
+ A at 0 range 0 .. 72*4-1;
+ end record;
+
+ X : Ar1;
+ Y : Ar2;
+
+begin
+ Y (1) := X (1);
+end;
diff --git a/gcc/testsuite/gnat.dg/pack7.adb b/gcc/testsuite/gnat.dg/pack7.adb
new file mode 100644
index 00000000000..000e7fa8163
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/pack7.adb
@@ -0,0 +1,27 @@
+-- { dg-do compile }
+-- { dg-options "-gnatws" }
+
+procedure Pack7 is
+
+ type R is record
+ I : Integer;
+ a, b : Character;
+ end record;
+
+ type Ar1 is array (1..4) of R;
+ type Ar2 is array (1..4) of R;
+ pragma Pack (Ar2);
+
+ type R2 is record
+ A : Ar2;
+ end record;
+ for R2 use record
+ A at 0 range 0 .. 48*4-1;
+ end record;
+
+ X : Ar1;
+ Y : Ar2;
+
+begin
+ Y (1) := X (1);
+end;
diff --git a/gcc/testsuite/gnat.dg/pack8.adb b/gcc/testsuite/gnat.dg/pack8.adb
new file mode 100644
index 00000000000..a3a83bab0a9
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/pack8.adb
@@ -0,0 +1,27 @@
+-- { dg-do compile }
+-- { dg-options "-gnatws" }
+
+procedure Pack8 is
+
+ type R is record
+ I : Integer;
+ a, b : Character;
+ end record;
+
+ type Ar1 is array (1..4) of R;
+ type Ar2 is array (1..4) of R;
+ pragma Pack (Ar2);
+
+ type R2 is record
+ A : Ar2;
+ end record;
+ for R2 use record
+ A at 0 range 0 .. 48*4-1-1; -- { dg-error "too small" }
+ end record;
+
+ X : Ar1;
+ Y : Ar2;
+
+begin
+ Y (1) := X (1);
+end;
diff --git a/gcc/testsuite/gnat.dg/parent_ltd_with-child_full_view.adb b/gcc/testsuite/gnat.dg/parent_ltd_with-child_full_view.adb
new file mode 100644
index 00000000000..cd8cf4240d4
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/parent_ltd_with-child_full_view.adb
@@ -0,0 +1,12 @@
+-- { dg-do compile }
+
+package body Parent_Ltd_With.Child_Full_View is
+
+ function New_Child_Symbol return Child_Symbol_Access is
+ Sym : constant Child_Symbol_Access := new Child_Symbol'(Comp => 10);
+
+ begin
+ return Sym;
+ end New_Child_Symbol;
+
+end Parent_Ltd_With.Child_Full_View;
diff --git a/gcc/testsuite/gnat.dg/parent_ltd_with-child_full_view.ads b/gcc/testsuite/gnat.dg/parent_ltd_with-child_full_view.ads
new file mode 100644
index 00000000000..3f7aa2e99fc
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/parent_ltd_with-child_full_view.ads
@@ -0,0 +1,12 @@
+package Parent_Ltd_With.Child_Full_View is
+
+ type Child_Symbol is new Parent_Ltd_With.Symbol with private;
+ type Child_Symbol_Access is access all Child_Symbol;
+
+ function New_Child_Symbol return Child_Symbol_Access;
+
+private
+
+ type Child_Symbol is new Parent_Ltd_With.Symbol with null record;
+
+end Parent_Ltd_With.Child_Full_View;
diff --git a/gcc/testsuite/gnat.dg/parent_ltd_with.ads b/gcc/testsuite/gnat.dg/parent_ltd_with.ads
new file mode 100644
index 00000000000..637aa7c3beb
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/parent_ltd_with.ads
@@ -0,0 +1,15 @@
+limited with Parent_Ltd_With.Child_Full_View;
+
+package Parent_Ltd_With is
+
+ type Symbol is abstract tagged limited private;
+
+ type Symbol_Access is access all Symbol'Class;
+
+private
+
+ type Symbol is abstract tagged limited record
+ Comp : Integer;
+ end record;
+
+end Parent_Ltd_With;
diff --git a/gcc/testsuite/gnat.dg/pr35823.adb b/gcc/testsuite/gnat.dg/pr35823.adb
deleted file mode 100644
index e882aa3682f..00000000000
--- a/gcc/testsuite/gnat.dg/pr35823.adb
+++ /dev/null
@@ -1,6 +0,0 @@
-procedure pr35823 (Arg : in String) is
- Size : constant Natural := Arg'Size;
-begin
- null;
-end pr35823;
-
diff --git a/gcc/testsuite/gnat.dg/rt1.adb b/gcc/testsuite/gnat.dg/rt1.adb
new file mode 100644
index 00000000000..ce94928caca
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/rt1.adb
@@ -0,0 +1,9 @@
+-- { dg-do compile }
+
+package body RT1 is
+ procedure P (S : access Root_Stream_Type'Class) is
+ Val : constant Ptr := Ptr'Input (S);
+ begin
+ null;
+ end P;
+end RT1;
diff --git a/gcc/testsuite/gnat.dg/rt1.ads b/gcc/testsuite/gnat.dg/rt1.ads
new file mode 100644
index 00000000000..50cbbf0ff74
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/rt1.ads
@@ -0,0 +1,14 @@
+with Ada.Streams; use Ada.Streams;
+package RT1 is
+ pragma Remote_Types;
+
+ type Ptr is private;
+ procedure Read (X : access Root_Stream_Type'Class; V : out Ptr) is null;
+ procedure Write (X : access Root_Stream_Type'Class; V : Ptr) is null;
+ for Ptr'Read use Read;
+ for Ptr'Write use Write;
+
+ procedure P (S : access Root_Stream_Type'Class);
+private
+ type Ptr is not null access all Integer;
+end RT1;
diff --git a/gcc/testsuite/gnat.dg/size_attribute.adb b/gcc/testsuite/gnat.dg/size_attribute.adb
new file mode 100644
index 00000000000..25642e0b0aa
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/size_attribute.adb
@@ -0,0 +1,8 @@
+-- PR middle-end/35823
+-- { dg-do compile ]
+
+procedure Size_Attribute (Arg : in String) is
+ Size : constant Natural := Arg'Size;
+begin
+ null;
+end;
diff --git a/gcc/testsuite/gnat.dg/specs/aggr1.ads b/gcc/testsuite/gnat.dg/specs/aggr1.ads
new file mode 100644
index 00000000000..6c766351374
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/aggr1.ads
@@ -0,0 +1,8 @@
+-- { dg-do compile }
+
+package aggr1 is
+ type Buffer_Array is array (1 .. 2 ** 23) of Integer;
+ type Message is record
+ Data : Buffer_Array := (others => 0);
+ end record;
+end;
diff --git a/gcc/testsuite/gnat.dg/specs/fe_inlining.ads b/gcc/testsuite/gnat.dg/specs/fe_inlining.ads
new file mode 100644
index 00000000000..ef5f4694210
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/fe_inlining.ads
@@ -0,0 +1,4 @@
+-- { dg-do compile }
+-- { dg-options "-O -gnatN" }
+with FE_Inlining_Helper;
+procedure FE_Inlining is new FE_Inlining_Helper;
diff --git a/gcc/testsuite/gnat.dg/specs/fe_inlining_helper.adb b/gcc/testsuite/gnat.dg/specs/fe_inlining_helper.adb
new file mode 100644
index 00000000000..c149ea3c798
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/fe_inlining_helper.adb
@@ -0,0 +1,4 @@
+procedure FE_Inlining_Helper is
+begin
+ null;
+end FE_Inlining_Helper;
diff --git a/gcc/testsuite/gnat.dg/specs/fe_inlining_helper.ads b/gcc/testsuite/gnat.dg/specs/fe_inlining_helper.ads
new file mode 100644
index 00000000000..733268c65e7
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/fe_inlining_helper.ads
@@ -0,0 +1,3 @@
+-- { dg-excess-errors "no code generated" }
+generic
+procedure FE_Inlining_Helper;
diff --git a/gcc/testsuite/gnat.dg/specs/linker_section.ads b/gcc/testsuite/gnat.dg/specs/linker_section.ads
new file mode 100644
index 00000000000..ae2d4029cf9
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/linker_section.ads
@@ -0,0 +1,10 @@
+package Linker_Section is
+ Data1 : constant String := "12345678901234567";
+ pragma Linker_Section (Entity => Data1,
+ Section => ".eeprom");
+ type EEPROM_String is new String;
+ pragma Linker_Section (Entity => EEPROM_String, -- { dg-error "type" }
+ Section => ".eeprom");
+ Data2 : constant EEPROM_String := "12345678901234567";
+end Linker_Section;
+
diff --git a/gcc/testsuite/gnat.dg/specs/renamings.ads b/gcc/testsuite/gnat.dg/specs/renamings.ads
new file mode 100644
index 00000000000..3b90827e9fb
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/renamings.ads
@@ -0,0 +1,14 @@
+package Renamings is
+
+ package Inner is
+ procedure PI (X : Integer);
+ end Inner;
+
+ procedure P (X : Integer) renames Inner.PI;
+ procedure P (X : Float);
+ pragma Convention (C, P); -- { dg-error "non-local renaming" }
+
+ procedure Q (X : Float);
+ procedure Q (X : Integer) renames Inner.PI;
+ pragma Convention (C, Q); -- { dg-error "non-local renaming" }
+end Renamings;
diff --git a/gcc/testsuite/gnat.dg/specs/static_initializer2.ads b/gcc/testsuite/gnat.dg/specs/static_initializer2.ads
new file mode 100644
index 00000000000..3b27f26bde7
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/static_initializer2.ads
@@ -0,0 +1,22 @@
+-- { dg-do compile }
+
+package Static_Initializer2 is
+
+ type A is array (1..5) of Integer;
+ f : constant A := (1, 2, 3, 4, 5);
+
+ i1 : integer renames f(1);
+ i2 : integer renames f(2);
+ i3 : integer renames f(3);
+ i4 : integer renames f(4);
+ i5 : integer renames f(5);
+
+ b1 : boolean := i1 = 1;
+ b2 : boolean := i2 = 2;
+ b3 : boolean := i3 = 3;
+ b4 : boolean := i4 = 4;
+ b5 : boolean := i5 = 5;
+
+end Static_Initializer2;
+
+-- { dg-final { scan-assembler-not "elabs" } }
diff --git a/gcc/testsuite/gnat.dg/specs/storage.ads b/gcc/testsuite/gnat.dg/specs/storage.ads
new file mode 100644
index 00000000000..85a91d0724e
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/storage.ads
@@ -0,0 +1,10 @@
+-- { dg-do compile }
+with System.Pool_Global;
+package Storage is
+ x1: System.Pool_Global.Unbounded_No_Reclaim_Pool;
+ type T1 is access integer;
+ for T1'Storage_Pool use (x1); -- { dg-error "denote a variable" }
+ type T2 is access Integer;
+ for T2'Storage_Pool use x1;
+end Storage;
+
diff --git a/gcc/testsuite/gnat.dg/specs/warnstar.ads b/gcc/testsuite/gnat.dg/specs/warnstar.ads
new file mode 100644
index 00000000000..325cbb6f329
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/warnstar.ads
@@ -0,0 +1,12 @@
+-- { dg-do compile }
+
+pragma Warnings (Off, "*bits of*unused");
+package warnstar is
+ type r is record
+ a : integer;
+ end record;
+
+ for r use record
+ a at 0 range 0 .. 1023;
+ end record;
+end warnstar;
diff --git a/gcc/testsuite/gnat.dg/test_time_stamp.adb b/gcc/testsuite/gnat.dg/test_time_stamp.adb
new file mode 100644
index 00000000000..1e25f878041
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/test_time_stamp.adb
@@ -0,0 +1,37 @@
+-- { dg-do run }
+
+with GNAT.Time_Stamp;
+use GNAT.Time_Stamp;
+
+procedure test_time_stamp is
+ S : constant String := Current_Time;
+
+ function NN (S : String) return Boolean is
+ begin
+ for J in S'Range loop
+ if S (J) not in '0' .. '9' then
+ return True;
+ end if;
+ end loop;
+ return False;
+ end NN;
+
+begin
+ if S'Length /= 22
+ or else S (5) /= '-'
+ or else S (8) /= '-'
+ or else S (11) /= ' '
+ or else S (14) /= ':'
+ or else S (17) /= ':'
+ or else S (20) /= '.'
+ or else NN (S (1 .. 4))
+ or else NN (S (6 .. 7))
+ or else NN (S (9 .. 10))
+ or else NN (S (12 .. 13))
+ or else NN (S (15 .. 16))
+ or else NN (S (18 .. 19))
+ or else NN (S (21 .. 22))
+ then
+ raise Program_Error;
+ end if;
+end;
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 2d50643485b..180ce86da2e 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -383,6 +383,21 @@ proc check_gc_sections_available { } {
return $gc_sections_available_saved
}
+# Return 1 if according to target_info struct and explicit target list
+# target is supposed to support trampolines.
+
+proc check_effective_target_trampolines { } {
+ if [target_info exists no_trampolines] {
+ return 0
+ }
+ if { [istarget avr-*-*]
+ || [istarget hppa2.0w-hp-hpux11.23]
+ || [istarget hppa64-hp-hpux11.23] } {
+ return 0;
+ }
+ return 1
+}
+
# Return true if profiling is supported on the target.
proc check_profiling_available { test_what } {
@@ -435,6 +450,7 @@ proc check_profiling_available { test_what } {
|| [istarget arm*-*-eabi*]
|| [istarget arm*-*-elf]
|| [istarget arm*-*-symbianelf*]
+ || [istarget avr-*-*]
|| [istarget bfin-*-*]
|| [istarget powerpc-*-eabi*]
|| [istarget strongarm*-*-elf]
@@ -2221,7 +2237,7 @@ proc check_effective_target_simulator { } {
return 0
}
-# Return 1 if the target is a VxWorks RTP.
+# Return 1 if the target is a VxWorks kernel.
proc check_effective_target_vxworks_kernel { } {
return [check_no_compiler_messages vxworks_kernel assembly {
@@ -2231,6 +2247,16 @@ proc check_effective_target_vxworks_kernel { } {
}]
}
+# Return 1 if the target is a VxWorks RTP.
+
+proc check_effective_target_vxworks_rtp { } {
+ return [check_no_compiler_messages vxworks_rtp assembly {
+ #if !defined __vxworks || !defined __RTP__
+ #error NO
+ #endif
+ }]
+}
+
# Return 1 if the target is expected to provide wide character support.
proc check_effective_target_wchar { } {