summaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-03 07:15:51 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-03 07:15:51 +0000
commit43ee3f43c8355e623faca36246804e55a784b985 (patch)
treebe310b3c549e4a26b6cc910f7f7dc8dcbd09a174 /gcc/testsuite
parentc5f9099f3c8c8e7e3a89952504f01eec289117bd (diff)
downloadgcc-43ee3f43c8355e623faca36246804e55a784b985.tar.gz
2009-09-03 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 151367 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@151369 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog248
-rw-r--r--gcc/testsuite/g++.dg/cdce3.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum1.C2
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C2
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-1.C16
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-2.C22
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-3.C24
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-4.C32
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-5.C28
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-6.C38
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C61
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/template-params-1.C15
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/template-params-2.C23
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/template-params-3.C25
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/template-params-4.C30
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/template-params-5.C29
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C44
-rw-r--r--gcc/testsuite/g++.dg/ipa/iinline-1.C2
-rw-r--r--gcc/testsuite/g++.dg/parse/enum5.C17
-rw-r--r--gcc/testsuite/g++.dg/template/cond2.C4
-rw-r--r--gcc/testsuite/g++.dg/template/pr35240.C4
-rw-r--r--gcc/testsuite/g++.dg/torture/pr41186.C29
-rw-r--r--gcc/testsuite/g++.dg/torture/type-generic-1.C2
-rw-r--r--gcc/testsuite/g++.dg/tree-prof/inline_mismatch_args.C2
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/pr41186.C35
-rw-r--r--gcc/testsuite/g++.dg/warn/unit-1.C2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/builtin_unreachable-1.c6
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/fix-trunc-mem-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/20090902-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/builtin-object-size-9.c31
-rw-r--r--gcc/testsuite/gcc.dg/gomp/combined-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/guality/example.c138
-rw-r--r--gcc/testsuite/gcc.dg/guality/guality.c28
-rw-r--r--gcc/testsuite/gcc.dg/guality/guality.exp7
-rw-r--r--gcc/testsuite/gcc.dg/guality/guality.h330
-rw-r--r--gcc/testsuite/gcc.dg/memcpy-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr28796-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/torture/builtin-math-7.c2
-rw-r--r--gcc/testsuite/gcc.dg/torture/type-generic-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/inline-3.c1
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/local-pure-const.c1
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/sra-8.c35
-rw-r--r--gcc/testsuite/gcc.dg/uninit-I.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/funcspec-5.c2
-rw-r--r--gcc/testsuite/gfortran.dg/allocatable_scalar_1.f9018
-rw-r--r--gcc/testsuite/gfortran.dg/allocatable_scalar_2.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/allocate_derived_1.f9053
-rw-r--r--gcc/testsuite/gfortran.dg/boz_14.f902
-rw-r--r--gcc/testsuite/gfortran.dg/class_3.f0315
-rw-r--r--gcc/testsuite/gfortran.dg/erf_2.F902
-rw-r--r--gcc/testsuite/gfortran.dg/init_flag_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/init_flag_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/init_flag_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/integer_exponentiation_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/integer_exponentiation_5.F902
-rw-r--r--gcc/testsuite/gfortran.dg/isnan_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/isnan_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/line_length_3.f23
-rw-r--r--gcc/testsuite/gfortran.dg/line_length_4.f9018
-rw-r--r--gcc/testsuite/gfortran.dg/maxlocval_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/maxlocval_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/minlocval_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/minlocval_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/module_nan.f902
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_42.f902
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_43.f902
-rw-r--r--gcc/testsuite/gfortran.dg/nan_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/nan_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/nan_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/nan_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/nan_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/nearest_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/nearest_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/nearest_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pr37243.f2
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/real_const_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/transfer_simplify_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/whole_file_5.f903
-rw-r--r--gcc/testsuite/gfortran.dg/whole_file_6.f903
-rw-r--r--gcc/testsuite/gnat.dg/misaligned_param.adb30
-rw-r--r--gcc/testsuite/gnat.dg/misaligned_param_pkg.adb14
-rw-r--r--gcc/testsuite/gnat.dg/misaligned_param_pkg.ads5
-rw-r--r--gcc/testsuite/gnat.dg/slice7.adb2
-rw-r--r--gcc/testsuite/lib/gcc-dg.exp10
-rw-r--r--gcc/testsuite/lib/target-supports.exp13
86 files changed, 1520 insertions, 101 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 719e905c186..06e50502bc4 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,169 @@
+2009-09-02 David Daney <ddaney@caviumnetworks.com>
+
+ * gcc.c-torture/compile/builtin_unreachable-1.c: New testcase.
+
+2009-09-03 Diego Novillo <dnovillo@google.com>
+
+ * gcc.dg/gomp/combined-1.c: Adjust expected pattern.
+ * g++.dg/tree-prof/inline_mismatch_args.C: Likewise.
+ * g++.dg/warn/unit-1.C: Likewise.
+ * g++.dg/ipa/iinline-1.C: Likewise.
+ * g++.dg/template/cond2.C: Adjust expected line location for the
+ error.
+ * g++.dg/template/pr35240.C: Likewise.
+
+2009-09-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * gcc.dg/tree-ssa/inline-3.c: Add -fpie when pic.
+ * gcc.dg/tree-ssa/local-pure-const.c: Likewise.
+
+2009-09-02 Martin Jambor <mjambor@suse.cz>
+
+ * gcc.dg/tree-ssa/sra-8.c: New testcase.
+ * gcc.dg/memcpy-1.c: Add . to match pattern.
+ * gcc.dg/uninit-I.c: XFAIL warning test.
+ * g++.dg/warn/unit-1.C: XFAIL warning test.
+
+2009-09-02 Ian Lance Taylor <iant@google.com>
+
+ * gcc.dg/20090902-1.c: New test.
+
+2009-09-02 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/builtin-object-size-9.c: New test.
+
+2009-09-02 Olivier Hainque <hainque@adacore.com>
+
+ * gnat.dg/array7.ad[bs]: Add check for Signed_Integer_Type_Definition.
+
+2009-09-02 Eric Botcazou <ebotcazou@adacore.com>
+ Olivier Hainque <hainque@adacore.com>
+
+ * gnat.dg/misaligned_param.adb: New test.
+ * gnat.dg/misaligned_param_pkg.ad[sb]: New helper.
+ * gnat.dg/slice7.adb: Add 1 more related case.
+
+2009-09-01 Alexandre Oliva <aoliva@redhat.com>
+
+ * gcc.dg/guality/guality.c: Expect to fail for now.
+ * gcc.dg/guality/example.c: Likewise.
+
+2009-09-01 Alexandre Oliva <aoliva@redhat.com>
+
+ * gcc.dg/guality/guality.c: New.
+ * gcc.dg/guality/guality.h: New.
+ * gcc.dg/guality/guality.exp: New.
+ * gcc.dg/guality/example.c: New.
+ * lib/gcc-dg.exp (cleanup-dump): Remove .gk files.
+ (cleanup-saved-temps): Likewise, .gkd files too.
+
+2009-09-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/39229
+ * gfortran.dg/line_length_3.f: New test.
+ * gfortran.dg/line_length_4.f90: New test.
+
+2009-09-01 Loren J. Rittle <ljrittle@acm.org>
+
+ * lib/target-supports.exp (check_gc_sections_available):
+ Add proper pattern quote.
+
+2009-08-31 Uros Bizjak <ubizjak@gmail.com>
+ Kaz Kojima <kkojima@gcc.gnu.org>
+
+ * lib/target-supports.exp (add_options_for_ieee): New procedure.
+ * g++.dg/cdce3.C: Use dg-add-options ieee.
+ * g++.dg/torture/type-generic-1.C: Likewise.
+ * gcc.c-torture/compile/fix-trunc-mem-1.c: Likewise.
+ * gcc.dg/pr28796-2.c: Likewise.
+ * gcc.dg/torture/builtin-math-7.c: Likewise.
+ * gcc.dg/torture/type-generic-1.c: Likewise.
+ * gfortran.dg/boz_14.f90: Likewise.
+ * gfortran.dg/erf_2.F90: Likewise.
+ * gfortran.dg/init_flag_3.f90: Likewise.
+ * gfortran.dg/init_flag_4.f90: Likewise.
+ * gfortran.dg/init_flag_5.f90: Likewise.
+ * gfortran.dg/integer_exponentiation_1.f90: Likewise.
+ * gfortran.dg/integer_exponentiation_5.F90: Likewise.
+ * gfortran.dg/isnan_1.f90: Likewise.
+ * gfortran.dg/isnan_2.f90: Likewise.
+ * gfortran.dg/maxlocval_2.f90: Likewise.
+ * gfortran.dg/maxlocval_4.f90: Likewise.
+ * gfortran.dg/minlocval_1.f90: Likewise.
+ * gfortran.dg/minlocval_4.f90: Likewise.
+ * gfortran.dg/module_nan.f90: Likewise.
+ * gfortran.dg/namelist_42.f90: Likewise.
+ * gfortran.dg/namelist_43.f90: Likewise.
+ * gfortran.dg/nan_1.f90: Likewise.
+ * gfortran.dg/nan_2.f90: Likewise.
+ * gfortran.dg/nan_3.f90: Likewise.
+ * gfortran.dg/nan_4.f90: Likewise.
+ * gfortran.dg/nan_5.f90: Likewise.
+ * gfortran.dg/nearest_1.f90: Likewise.
+ * gfortran.dg/nearest_2.f90: Likewise.
+ * gfortran.dg/nearest_3.f90: Likewise.
+ * gfortran.dg/pr37243.f: Likewise.
+ * gfortran.dg/real_const_3.f90: Likewise.
+ * gfortran.dg/transfer_simplify_2.f90: Likewise.
+
+2009-08-31 Dodji Seketeli <dodji@redhat.com>
+
+ PR debug/30161
+ * g++.dg/debug/dwarf2/template-params-1.C: New test.
+ * g++.dg/debug/dwarf2/template-params-2.C: Likewise.
+ * g++.dg/debug/dwarf2/template-params-3.C: Likewise.
+ * g++.dg/debug/dwarf2/template-params-4.C: Likewise.
+ * g++.dg/debug/dwarf2/template-params-5.C: Likewise.
+ * g++.dg/debug/dwarf2/template-params-6.C: Likewise.
+ * g++.dg/debug/dwarf2/template-func-params-1.C: Likewise.
+ * g++.dg/debug/dwarf2/template-func-params-2.C: Likewise.
+ * g++.dg/debug/dwarf2/template-func-params-3.C: Likewise.
+ * g++.dg/debug/dwarf2/template-func-params-4.C: Likewise.
+ * g++.dg/debug/dwarf2/template-func-params-5.C: Likewise.
+ * g++.dg/debug/dwarf2/template-func-params-6.C: Likewise.
+ * g++.dg/debug/dwarf2/template-func-params-7.C: Likewise.
+
+2009-08-31 Jason Merrill <jason@redhat.com>
+
+ PR c++/41127
+ * g++.dg/parse/enum5.C: New.
+ * g++.dg/cpp0x/enum1.C: Adjust expected error.
+
+2009-08-31 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/40940
+ * gfortran.dg/allocate_derived_1.f90: New.
+ * gfortran.dg/class_3.f03: New.
+
+2009-08-31 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/40996
+ * gfortran.dg/allocatable_scalar_1.f90: New.
+ * gfortran.dg/allocatable_scalar_2.f90: Renamed from finalize_9.f03.
+ * gfortran.dg/finalize_9.f03: Renamed to allocatable_scalar_2.f90.
+ * gfortran.dg/proc_ptr_comp_pass_4.f90: Modified.
+
+2009-08-30 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/41186
+ * g++.dg/torture/pr41186.C: New testcase.
+ * g++.dg/tree-ssa/pr41186.C: Likewise.
+
+2009-08-30 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/41187
+ * g++.dg/debug/dwarf2/namespace-1.C: Use a loosier regexp to
+ take ia64 assembly comments syntax in account.
+
+2009-08-30 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/i386/funcspec-5.c: Remove fused-add test.
+
+2009-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * gfortran.dg/whole_file_5.f90: Add -fpie when pic, fix scan pattern.
+ * gfortran.dg/whole_file_6.f90: Likewise.
+
2009-08-28 Cary Coutant <ccoutant@google.com>
PR debug/41063
@@ -47,7 +213,7 @@
2009-08-27 Dodji Seketeli <dodji@redhat.com>
- PR debug/41770
+ PR debug/41170
* debug/dwarf2/namespace-1.C: New test.
2009-08-26 H.J. Lu <hongjiu.lu@intel.com>
@@ -268,7 +434,7 @@
2009-08-19 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Richard Earnshaw <richard.earnshaw@arm.com>
- * testsuite/gcc.target/arm/20090811-1.c: New test.
+ * gcc.target/arm/20090811-1.c: New test.
2009-08-19 Jakub Jelinek <jakub@redhat.com>
@@ -375,9 +541,9 @@
2009-08-16 Dodji Seketeli <dodji@redhat.com>
PR debug/37801
- * gcc/testsuite/gcc.dg/debug/20020224-1.c: Adjust the comment.
+ * gcc.dg/debug/20020224-1.c: Adjust the comment.
Make sure to trigger inlining optimizations.
- * gcc/testsuite/gcc.dg/debug/dwarf2/inline2.c: New test.
+ * gcc.dg/debug/dwarf2/inline2.c: New test.
2009-08-14 Janus Weil <janus@gcc.gnu.org>
@@ -444,16 +610,16 @@
2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
PR middle-end/40980
- * testsuite/gfortran.dg/graphite/id-17.f: New.
+ * gfortran.dg/graphite/id-17.f: New.
2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
- * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
+ * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
Pranav Garg <pranav.garg2107@gmail.com>
- * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
+ * gcc.dg/graphite/interchange-6.c: XFAILed.
2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
@@ -1078,48 +1244,48 @@
Pat Haugen <pthaugen@us.ibm.com>
Revital Eres <ERES@il.ibm.com>
- * testsuite/gcc.target/powerpc/altivec-32.c: New file to test
+ * gcc.target/powerpc/altivec-32.c: New file to test
Altivec simple math function vectorization.
- * testsuite/gcc.target/powerpc/bswap-run.c: New file to test swap
+ * gcc.target/powerpc/bswap-run.c: New file to test swap
builtins.
- * testsuite/gcc.target/powerpc/bswap16.c: Ditto.
- * testsuite/gcc.target/powerpc/bswap32.c: Ditto.
- * testsuite/gcc.target/powerpc/bswap64-1.c: Ditto.
- * testsuite/gcc.target/powerpc/bswap64-2.c: Ditto.
- * testsuite/gcc.target/powerpc/bswap64-3.c: Ditto.
- * testsuite/gcc.target/powerpc/optimize-bswapdi-2.c: Ditto.
- * testsuite/gcc.target/powerpc/optimize-bswapdi-3.c: Ditto.
- * testsuite/gcc.target/powerpc/optimize-bswapsi-2.c: Ditto.
-
- * testsuite/gcc.target/powerpc/popcount-2.c: New file to test
+ * gcc.target/powerpc/bswap16.c: Ditto.
+ * gcc.target/powerpc/bswap32.c: Ditto.
+ * gcc.target/powerpc/bswap64-1.c: Ditto.
+ * gcc.target/powerpc/bswap64-2.c: Ditto.
+ * gcc.target/powerpc/bswap64-3.c: Ditto.
+ * gcc.target/powerpc/optimize-bswapdi-2.c: Ditto.
+ * gcc.target/powerpc/optimize-bswapdi-3.c: Ditto.
+ * gcc.target/powerpc/optimize-bswapsi-2.c: Ditto.
+
+ * gcc.target/powerpc/popcount-2.c: New file to test
power7 popcntd instructions.
- * testsuite/gcc.target/powerpc/popcount-3.c: Ditto.
-
- * testsuite/gcc.target/powerpc/pr39457.c: New VSX test.
- * testsuite/gcc.target/powerpc/vsx-builtin-1.c: Ditto.
- * testsuite/gcc.target/powerpc/vsx-builtin-2.c: Ditto.
- * testsuite/gcc.target/powerpc/vsx-builtin-3.c: Ditto.
- * testsuite/gcc.target/powerpc/vsx-builtin-4.c: Ditto.
- * testsuite/gcc.target/powerpc/vsx-builtin-5.c: Ditto.
- * testsuite/gcc.target/powerpc/vsx-builtin-6.c: Ditto.
- * testsuite/gcc.target/powerpc/vsx-vector-1.c: Ditto.
- * testsuite/gcc.target/powerpc/vsx-vector-2.c: Ditto.
- * testsuite/gcc.target/powerpc/vsx-vector-3.c: Ditto.
- * testsuite/gcc.target/powerpc/vsx-vector-4.c: Ditto.
- * testsuite/gcc.target/powerpc/vsx-vector-5.c: Ditto.
- * testsuite/gcc.target/powerpc/vsx-vector-6.c: Ditto.
-
- * testsuite/gcc.target/powerpc/altivec-6.c: Store the result of
+ * gcc.target/powerpc/popcount-3.c: Ditto.
+
+ * gcc.target/powerpc/pr39457.c: New VSX test.
+ * gcc.target/powerpc/vsx-builtin-1.c: Ditto.
+ * gcc.target/powerpc/vsx-builtin-2.c: Ditto.
+ * gcc.target/powerpc/vsx-builtin-3.c: Ditto.
+ * gcc.target/powerpc/vsx-builtin-4.c: Ditto.
+ * gcc.target/powerpc/vsx-builtin-5.c: Ditto.
+ * gcc.target/powerpc/vsx-builtin-6.c: Ditto.
+ * gcc.target/powerpc/vsx-vector-1.c: Ditto.
+ * gcc.target/powerpc/vsx-vector-2.c: Ditto.
+ * gcc.target/powerpc/vsx-vector-3.c: Ditto.
+ * gcc.target/powerpc/vsx-vector-4.c: Ditto.
+ * gcc.target/powerpc/vsx-vector-5.c: Ditto.
+ * gcc.target/powerpc/vsx-vector-6.c: Ditto.
+
+ * gcc.target/powerpc/altivec-6.c: Store the result of
vec_add, so the optimizer doesn't remove it.
- * testsuite/gcc.dg/optimize-bswapdi-1.c: Add powerpc 64-bit to
+ * gcc.dg/optimize-bswapdi-1.c: Add powerpc 64-bit to
systems that support bswap64.
- * testsuite/gcc.dg/vmx/vmx.exp: Explicitly add -mno-vsx to
+ * gcc.dg/vmx/vmx.exp: Explicitly add -mno-vsx to
prevent VSX code generation.
- * testsuite/lib/target-supports.exp (check_vsx_hw_available): New
+ * lib/target-supports.exp (check_vsx_hw_available): New
function to test if VSX available.
(check_effective_target_powerpc_vsx_ok): Ditto.
(check_vmx_hw_available): Add explicit -mno-vsx.
@@ -1596,7 +1762,7 @@
2009-07-14 Jack Howarth <howarth@bromo.med.uc.edu>
- * testsuite/gcc.c-torture/compile/20000804-1.c: skip for ilp32 on
+ * gcc.c-torture/compile/20000804-1.c: skip for ilp32 on
both i?86-*-darwin* and x86_64-*-darwin*.
2009-07-14 Joseph Myers <joseph@codesourcery.com>
@@ -1708,7 +1874,7 @@
2009-07-10 David Daney <ddaney@caviumnetworks.com>
PR target/39079
- * testsuite/gcc.target/mips/mips.exp: Make -msynci a known option.
+ * gcc.target/mips/mips.exp: Make -msynci a known option.
* gcc.target/mips/clear-cache-1.c (dg-options): Add -msynci.
2009-07-10 Jakub Jelinek <jakub@redhat.com>
diff --git a/gcc/testsuite/g++.dg/cdce3.C b/gcc/testsuite/g++.dg/cdce3.C
index 6756a700812..3f05fd2e1d8 100644
--- a/gcc/testsuite/g++.dg/cdce3.C
+++ b/gcc/testsuite/g++.dg/cdce3.C
@@ -4,12 +4,12 @@
/* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details -DLARGE_LONG_DOUBLE -lm" { target { {! pow10 } && large_long_double } } } */
/* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details -DGNU_EXTENSION -lm" { target { pow10 && {! large_long_double } } } } */
/* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details -lm" { target { {! pow10 } && {! large_long_double } } } } */
-/* { dg-options "-mieee -O2 -fmath-errno -fdump-tree-cdce-details -DGNU_EXTENSION -DLARGE_LONG_DOUBLE -lm" { target { alpha*-*-* && { pow10 && large_long_double } } } } */
-/* { dg-options "-mieee -O2 -fmath-errno -fdump-tree-cdce-details -DLARGE_LONG_DOUBLE -lm" { target { alpha*-*-* && { {! pow10 } && large_long_double } } } } */
-/* { dg-options "-mieee -O2 -fmath-errno -fdump-tree-cdce-details -DGNU_EXTENSION -lm" { target { alpha*-*-* && { pow10 && {! large_long_double } } } } } */
-/* { dg-options "-mieee -O2 -fmath-errno -fdump-tree-cdce-details -lm" { target { alpha*-*-* && { {! pow10 } && {! large_long_double } } } } } */
-/* { dg-final { scan-tree-dump "cdce3.C:95: note: function call is shrink-wrapped into error conditions\." "cdce" { target { pow10 } } } } */
-/* { dg-final { scan-tree-dump "cdce3.C:96: note: function call is shrink-wrapped into error conditions\." "cdce" { target { pow10 } } } } */
+/* { dg-add-options ieee } */
+/* { dg-final { scan-tree-dump "cdce3.C:92: note: function call is shrink-wrapped into error conditions\." "cdce" { target { pow10 } } } } */
+/* { dg-final { scan-tree-dump "cdce3.C:93: note: function call is shrink-wrapped into error conditions\." "cdce" { target { pow10 } } } } */
+/* { dg-final { scan-tree-dump "cdce3.C:95: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
+/* { dg-final { scan-tree-dump "cdce3.C:96: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
+/* { dg-final { scan-tree-dump "cdce3.C:97: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
/* { dg-final { scan-tree-dump "cdce3.C:98: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
/* { dg-final { scan-tree-dump "cdce3.C:99: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
/* { dg-final { scan-tree-dump "cdce3.C:100: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
@@ -21,9 +21,6 @@
/* { dg-final { scan-tree-dump "cdce3.C:106: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
/* { dg-final { scan-tree-dump "cdce3.C:107: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
/* { dg-final { scan-tree-dump "cdce3.C:108: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
-/* { dg-final { scan-tree-dump "cdce3.C:109: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
-/* { dg-final { scan-tree-dump "cdce3.C:110: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
-/* { dg-final { scan-tree-dump "cdce3.C:111: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
/* { dg-final { cleanup-tree-dump "cdce" } } */
#include <stdlib.h>
#include <math.h>
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum1.C b/gcc/testsuite/g++.dg/cpp0x/enum1.C
index af691f028b1..fb03692fab4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/enum1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/enum1.C
@@ -2,5 +2,5 @@
// { dg-do compile }
// { dg-options "-std=gnu++0x" }
-enum : { }; // { dg-error "expected type-specifier" }
+enum : { }; // { dg-error "expected" }
enum : 3 { }; // { dg-error "expected" }
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C b/gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C
index aad89ba5c30..59b608fc7ec 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C
@@ -8,7 +8,7 @@
// { dg-final { scan-assembler-times "DIE +\\(.*?\\) DW_TAG_namespace" 1 } }
// { dg-final { scan-assembler-times "DW_AT_name: \"not_emitted\"" 1 } }
// { dg-final { scan-assembler-times "DIE +\\(.*?\\) DW_TAG_typedef" 1 } }
-// { dg-final { scan-assembler-times "\.ascii \"T.0\"\[\t \]+# DW_AT_name" 1 } }
+// { dg-final { scan-assembler-times "\.ascii \"T.0\"\[\t \]+.*?DW_AT_name" 1 } }
struct strukt
{
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-1.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-1.C
new file mode 100644
index 00000000000..3a43d9fa571
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-1.C
@@ -0,0 +1,16 @@
+// Contributed by Dodji Seketeli <dodji@redhat.com>
+// origin PR debug/30161
+// { dg-options "-g -dA" }
+// { dg-do compile }
+// { dg-final { scan-assembler "DW_TAG_template_type_param" } }
+// { dg-final { scan-assembler "U.*DW_AT_name" } }
+
+template <class U>
+U
+func(U m)
+{
+ return m;
+}
+
+int i = func<int>(2);
+
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-2.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-2.C
new file mode 100644
index 00000000000..27c68d79643
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-2.C
@@ -0,0 +1,22 @@
+// Contributed by Dodji Seketeli <dodji@redhat.com>
+// origin PR debug/30161
+// { dg-options "-g -dA" }
+// { dg-do compile }
+// { dg-final { scan-assembler "DW_TAG_template_value_param" } }
+// { dg-final { scan-assembler "i.*DW_AT_name" } }
+// { dg-final { scan-assembler "3.*DW_AT_const_value" } }
+
+
+template <int i>
+int
+func()
+{
+ int j = i;
+ return j;
+}
+
+const int foo = 1;
+const int bar = 2;
+
+int h = func<foo+bar>();
+
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-3.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-3.C
new file mode 100644
index 00000000000..9f3dc8c2870
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-3.C
@@ -0,0 +1,24 @@
+// Contributed by Dodji Seketeli <dodji@redhat.com>
+// Origin PR debug/30161
+// { dg-options "-g -dA" }
+// { dg-final { scan-assembler "DW_TAG_template_value_param" } }
+// { dg-final { scan-assembler "f.*DW_AT_name" } }
+// { dg-final { scan-assembler "_Z4blehv.*DW_AT_const_value" } }
+
+typedef void (*func_ptr)();
+
+template <func_ptr f>
+int
+func()
+{
+ f();
+ return 0;
+}
+
+void
+bleh()
+{
+}
+
+int c = func<bleh>();
+
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-4.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-4.C
new file mode 100644
index 00000000000..0eb0fe5f138
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-4.C
@@ -0,0 +1,32 @@
+// Contributed by Dodji Seketeli <dodji@redhat.com>
+// Origin PR debug/30161
+// { dg-options "-std=c++0x -g -dA" }
+// { dg-final { scan-assembler "DW_TAG_template_type_param" } }
+// { dg-final { scan-assembler "DW_AT_name.*P#0" } }
+// { dg-final { scan-assembler "DW_AT_name.*P#1" } }
+// { dg-final { scan-assembler "DW_AT_name.*P#2" } }
+
+
+template <typename... Args> struct count;
+
+template <>
+struct count<>
+{
+ static const int value = 0;
+};
+
+template <typename T, typename... Args>
+struct count<T, Args...>
+{
+ static const int value = 1 + count<Args...>::value;
+};
+
+template<typename... P>
+int
+do_count()
+{
+ return count<P...>::value;
+}
+
+int c = do_count<int, char, long>();
+
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-5.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-5.C
new file mode 100644
index 00000000000..c4fd8dc3e77
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-5.C
@@ -0,0 +1,28 @@
+// Contributed by Dodji Seketeli <dodji@redhat.com>
+// Origin PR debug/30161
+// { dg-options "-g -dA" }
+// { dg-final { scan-assembler "DW_TAG_template_type_param" } }
+// { dg-final { scan-assembler "T.*DW_AT_name" } }
+
+template <class T>
+struct vector
+{
+ int size;
+
+ vector () : size (0)
+ {
+ }
+};
+
+
+template<template <class T> class U>
+int
+bar()
+{
+ U<int> u;
+ return u.size;
+}
+
+vector<int> v;
+int j = bar<vector>();
+
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-6.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-6.C
new file mode 100644
index 00000000000..155add48ef4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-6.C
@@ -0,0 +1,38 @@
+// Contributed by Dodji Seketeli <dodji@redhat.com>
+// Origin PR debug/30161
+// { dg-options "-g -dA" }
+// { dg-final { scan-assembler-times "DW_TAG_GNU_template_template_param" 2 } }
+// { dg-final { scan-assembler-times "DW_AT_GNU_template_name: \"vector\"" 1 } }
+// { dg-final { scan-assembler-times ".ascii \"U.0\".*?DW_AT_name" 1 } }
+
+template <class T>
+struct vector_base
+{
+
+ static int get_sizeof_t()
+ {
+ return 0;
+ }
+};
+
+template <class T>
+struct vector : public vector_base<T>
+{
+ static int get_sizeof_t()
+ {
+ return sizeof (T);
+ }
+ T member1;
+ T member2;
+};
+
+template <template <class T> class U>
+int
+bar()
+{
+ return U<int>::get_sizeof_t();
+}
+
+int i = bar<vector>();
+
+
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C
new file mode 100644
index 00000000000..07aece6917f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C
@@ -0,0 +1,61 @@
+// Contributed by Dodji Seketeli <dodji@redhat.com>
+// Origin PR debug/30161
+// { dg-options "-g -dA -std=c++0x" }
+// { dg-do compile }
+
+// There must be 5 subprograms generated:
+// printf(const char*), printf<int, char, int>,
+// printf<char, int>, printf<int> and foo().
+// { dg-final {scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_subprogram" 5 } }
+
+// That makes 6 template type parameters.
+// { dg-final {scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_template_type_param" 6 } }
+// { dg-final {scan-assembler-times "DW_AT_name: \"printf<int, char, int>\"" 1 } }
+// { dg-final {scan-assembler-times "DW_AT_name: \"printf<char, int>\"" 1 } }
+// { dg-final {scan-assembler-times "DW_AT_name: \"printf<int>\"" 1 } }
+// { dg-final {scan-assembler-times "DW_AT_name: \"printf\"" 1 } }
+
+// printf<int, char, int> and printf<char, int> have a pack expansion as
+// function parameters. In the former, the elements of the parameter pack
+// expansion are PackTypes#0, PackTypes#1 and the arguments are args#0 and
+// args#1. In the later, the element of the parameter pack expansion
+// is PackTypes#0 and the argument is args#0.
+// { dg-final {scan-assembler-times "DW_AT_name: \"PackTypes#0\"" 2 } }
+// { dg-final {scan-assembler-times "DW_AT_name: \"args#0\"" 2 } }
+// { dg-final {scan-assembler-times "DW_AT_name: \"PackTypes#1\"" 1 } }
+// { dg-final {scan-assembler-times "DW_AT_name: \"args#1\"" 1 } }
+
+// { dg_final {scan-assembler-times "\.ascii \"T.0\"\[\t \]+.*?DW_AT_name" 3 } }
+
+void
+printf(const char* s)
+{
+ /* Commented this to not pull std::cout into what should be
+ a simple test.
+ while (*s)
+ std::cout << *s++;
+ */
+}
+
+template<typename T, typename... PackTypes>
+void
+printf(const char* s,
+ T value,
+ PackTypes... args)
+{
+ while (*s)
+ {
+ if (*s == '%' && *++s != '%')
+ {
+ /* std::cout << value; */
+ return printf(++s, args...);
+ }
+ }
+}
+
+void
+foo ()
+{
+ int x;
+ printf("%c %d", x, 'x', 3);
+}
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-1.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-1.C
new file mode 100644
index 00000000000..e28297b5591
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-1.C
@@ -0,0 +1,15 @@
+// Contributed by Dodji Seketeli <dodji@redhat.com>
+// origin PR debug/30161
+// { dg-options "-g -dA" }
+// { dg-do compile }
+// { dg-final { scan-assembler "DW_TAG_template_type_param" } }
+// { dg-final { scan-assembler "U.*DW_AT_name" } }
+
+template <class U>
+class A
+{
+ U m;
+};
+
+A<int> a;
+
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-2.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-2.C
new file mode 100644
index 00000000000..ce5fbab74b0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-2.C
@@ -0,0 +1,23 @@
+// Contributed by Dodji Seketeli <dodji@redhat.com>
+// origin PR debug/30161
+// { dg-options "-g -dA" }
+// { dg-do compile }
+// { dg-final { scan-assembler "DW_TAG_template_value_param" } }
+// { dg-final { scan-assembler "i.*DW_AT_name" } }
+// { dg-final { scan-assembler "3.*DW_AT_const_value" } }
+
+template <int i>
+struct A
+{
+ int m;
+ A ()
+ {
+ m = i;
+ }
+};
+
+const int foo = 1;
+const int bar = 2;
+
+A<foo+bar> a;
+
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-3.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-3.C
new file mode 100644
index 00000000000..06b0e2b821a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-3.C
@@ -0,0 +1,25 @@
+// Contributed by Dodji Seketeli <dodji@redhat.com>
+// Origin PR debug/30161
+// { dg-options "-g -dA" }
+// { dg-final { scan-assembler "DW_TAG_template_value_param" } }
+// { dg-final { scan-assembler "f.*DW_AT_name" } }
+// { dg-final { scan-assembler "_Z4blehv.*DW_AT_const_value" } }
+
+typedef void (*func_ptr) ();
+
+template <func_ptr f>
+struct A
+{
+ A ()
+ {
+ f ();
+ }
+};
+
+void
+bleh ()
+{
+}
+
+A<bleh> a;
+
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-4.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-4.C
new file mode 100644
index 00000000000..09d1d95de6b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-4.C
@@ -0,0 +1,30 @@
+// Contributed by Dodji Seketeli <dodji@redhat.com>
+// Origin PR debug/30161
+// { dg-options "-std=c++0x -g -dA" }
+// { dg-final { scan-assembler "DW_TAG_template_type_param" } }
+// { dg-final { scan-assembler "DW_AT_name.*Args#0" } }
+// { dg-final { scan-assembler "DW_AT_name.*Args#1" } }
+// { dg-final { scan-assembler "DW_AT_name.*Args#2" } }
+
+template <typename... Args> struct count;
+
+template <>
+struct count<>
+{
+ static const int value = 0;
+};
+
+template <typename T, typename... Args>
+struct count<T, Args...>
+{
+ static const int value = 1 + count<Args...>::value;
+};
+
+int
+foo ()
+{
+ count<int, char, long> c;
+ int nb = count<int, char, long>::value;
+ return nb;
+}
+
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-5.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-5.C
new file mode 100644
index 00000000000..f36eac5f334
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-5.C
@@ -0,0 +1,29 @@
+// Contributed by Dodji Seketeli <dodji@redhat.com>
+// Origin PR debug/30161
+// { dg-options "-g -dA" }
+// { dg-final { scan-assembler "DW_TAG_template_type_param" } }
+// { dg-final { scan-assembler "T.*DW_AT_name" } }
+
+template <class T>
+struct vector
+{
+ int size;
+
+ vector () : size (0)
+ {
+ }
+};
+
+template<template <class T> class U>
+struct bar
+{
+ U<int> u;
+ int m;
+ bar () : m (u.size)
+ {
+ }
+};
+
+vector<int> v;
+bar<vector> b;
+
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C
new file mode 100644
index 00000000000..dc401fa06e7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C
@@ -0,0 +1,44 @@
+// Contributed by Dodji Seketeli <dodji@redhat.com>
+// Origin PR debug/30161
+// { dg-options "-g -dA" }
+// { dg-final { scan-assembler-times "DW_TAG_GNU_template_template_param" 2 } }
+// { dg-final { scan-assembler-times "DW_AT_GNU_template_name: \"vector\"" 1 } }
+// { dg-final { scan-assembler-times ".ascii \"U.0\".*?DW_AT_name" 1 } }
+
+template <class T>
+struct vector_base
+{
+ T tab[3 + 1];
+ static int get_sizeof_t()
+ {
+ return sizeof (tab);
+ }
+};
+
+template <class T>
+struct vector : public vector_base<T>
+{
+ static int get_sizeof_t()
+ {
+ return sizeof (T);
+ }
+ T member1;
+ T member2;
+};
+
+template <template <class T> class U>
+struct bar
+{
+ int foo()
+ {
+ return U<int>::get_sizeof_t ();
+ }
+};
+
+
+int
+foo_func ()
+{
+ bar<vector> b;
+ return b.foo ();
+}
diff --git a/gcc/testsuite/g++.dg/ipa/iinline-1.C b/gcc/testsuite/g++.dg/ipa/iinline-1.C
index 83490aa79b0..1453c7e4658 100644
--- a/gcc/testsuite/g++.dg/ipa/iinline-1.C
+++ b/gcc/testsuite/g++.dg/ipa/iinline-1.C
@@ -44,5 +44,5 @@ int main (int argc, char *argv[])
return 0;
}
-/* { dg-final { scan-ipa-dump "String::funcOne\[^\\n\]*inline copy in int main" "inline" } } */
+/* { dg-final { scan-ipa-dump "String::funcOne\[^\\n\]*inline copy in main" "inline" } } */
/* { dg-final { cleanup-ipa-dump "inline" } } */
diff --git a/gcc/testsuite/g++.dg/parse/enum5.C b/gcc/testsuite/g++.dg/parse/enum5.C
new file mode 100644
index 00000000000..3ebb02f7573
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/enum5.C
@@ -0,0 +1,17 @@
+// PR c++/41127
+
+#define CHAR_BIT 8
+enum EE {ee};
+typedef unsigned int T;
+
+struct D {
+ T : sizeof(unsigned int) * CHAR_BIT; // OK
+ EE : sizeof(EE) * CHAR_BIT; // OK
+ enum EE : sizeof(EE) * CHAR_BIT; // not OK
+ enum EE xxxx : sizeof(EE) * CHAR_BIT; // OK
+ T x : sizeof(unsigned int) * CHAR_BIT; // OK
+ enum FF {ff} : sizeof(int) * CHAR_BIT; // OK
+} element;
+
+enum EE xx;
+EE yy;
diff --git a/gcc/testsuite/g++.dg/template/cond2.C b/gcc/testsuite/g++.dg/template/cond2.C
index abb6ebb5d46..e6bd19d40fa 100644
--- a/gcc/testsuite/g++.dg/template/cond2.C
+++ b/gcc/testsuite/g++.dg/template/cond2.C
@@ -3,8 +3,8 @@
template<int X> class c;
-template<int X, int Y> int test(c<X ? : Y>&);
+template<int X, int Y> int test(c<X ? : Y>&); // { dg-error "omitted" }
void test(c<2>*c2) {
- test<0, 2>(*c2); // { dg-error "omitted" }
+ test<0, 2>(*c2);
}
diff --git a/gcc/testsuite/g++.dg/template/pr35240.C b/gcc/testsuite/g++.dg/template/pr35240.C
index de82897f685..1972cf73b87 100644
--- a/gcc/testsuite/g++.dg/template/pr35240.C
+++ b/gcc/testsuite/g++.dg/template/pr35240.C
@@ -4,9 +4,9 @@
template<int> struct A {};
-template<int N> A<sizeof(new int[N][N])> foo();
+template<int N> A<sizeof(new int[N][N])> foo(); // { dg-message "unimplemented" }
void bar()
{
- foo<1>(); // { dg-message "unimplemented" }
+ foo<1>();
}
diff --git a/gcc/testsuite/g++.dg/torture/pr41186.C b/gcc/testsuite/g++.dg/torture/pr41186.C
new file mode 100644
index 00000000000..fdfee2cd373
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr41186.C
@@ -0,0 +1,29 @@
+/* { dg-do run } */
+
+struct Foo {
+ Foo() {};
+ int i;
+ short f;
+};
+struct Bar : public Foo {
+ Bar() {};
+ short b;
+};
+
+extern "C" void abort(void);
+
+int main()
+{
+ Bar b1, b2;
+ b2.i = 0;
+ b1.f = 0;
+ b1.b = 1;
+ b2.f = 1;
+ b2.b = 2;
+ static_cast<Foo&>(b1) = static_cast<Foo&>(b2);
+ if (b1.i != 0 || b1.b != 1)
+ abort ();
+ if (b1.f != 1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/torture/type-generic-1.C b/gcc/testsuite/g++.dg/torture/type-generic-1.C
index e9c17c328e7..4d82592aff6 100644
--- a/gcc/testsuite/g++.dg/torture/type-generic-1.C
+++ b/gcc/testsuite/g++.dg/torture/type-generic-1.C
@@ -2,7 +2,7 @@
without any fast-math flags. */
/* { dg-do run } */
-/* { dg-options "-mieee" { target alpha*-*-* sh*-*-* } } */
+/* { dg-add-options ieee } */
/* { dg-skip-if "No Inf/NaN support" { spu-*-* } } */
#include "../../gcc.dg/tg-tests.h"
diff --git a/gcc/testsuite/g++.dg/tree-prof/inline_mismatch_args.C b/gcc/testsuite/g++.dg/tree-prof/inline_mismatch_args.C
index a0d488284b9..352e176a95c 100644
--- a/gcc/testsuite/g++.dg/tree-prof/inline_mismatch_args.C
+++ b/gcc/testsuite/g++.dg/tree-prof/inline_mismatch_args.C
@@ -31,6 +31,6 @@ int main(void)
baz.Bar(&baz, gid);
return 0;
}
-/* { dg-final-use { scan-tree-dump "Inlining virtual void Super::Foo" "einline2"} } */
+/* { dg-final-use { scan-tree-dump "Inlining .*Super::Foo" "einline2"} } */
/* { dg-final-use { scan-tree-dump-not "mismatched arguments" "einline2"} } */
/* { dg-final-use { cleanup-tree-dump "einline2" } } */
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr41186.C b/gcc/testsuite/g++.dg/tree-ssa/pr41186.C
new file mode 100644
index 00000000000..91f21a8c643
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr41186.C
@@ -0,0 +1,35 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-fre-details" } */
+
+struct Foo {
+ Foo() {};
+ int i;
+ short f;
+};
+struct Bar : public Foo {
+ Bar() {};
+ short b;
+};
+
+extern "C" void abort(void);
+
+int main()
+{
+ Bar b1, b2;
+ b2.i = 0;
+ b1.f = 0;
+ b1.b = 1;
+ b2.f = 1;
+ b2.b = 2;
+ static_cast<Foo&>(b1) = static_cast<Foo&>(b2);
+ if (b1.i != 0 || b1.b != 1)
+ abort ();
+ if (b1.f != 1)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "Replaced b1.b with 1" "fre" } } */
+/* { dg-final { scan-tree-dump "Replaced b1.i with 0" "fre" { xfail *-*-* } } } */
+/* { dg-final { scan-tree-dump "Replaced b1.f with 1" "fre" { xfail *-*-* } } } */
+/* { dg-final { cleanup-tree-dump "fre" } } */
diff --git a/gcc/testsuite/g++.dg/warn/unit-1.C b/gcc/testsuite/g++.dg/warn/unit-1.C
index 1bfe75b2f6c..49bc23136f4 100644
--- a/gcc/testsuite/g++.dg/warn/unit-1.C
+++ b/gcc/testsuite/g++.dg/warn/unit-1.C
@@ -4,7 +4,7 @@
struct a { int mode; };
int sys_msgctl (void)
{
- struct a setbuf; /* { dg-warning "'setbuf\.a::mode' is used" } */
+ struct a setbuf; /* { dg-warning "'setbuf.mode' is used" "" { xfail *-*-* } } */
return setbuf.mode;
}
diff --git a/gcc/testsuite/gcc.c-torture/compile/builtin_unreachable-1.c b/gcc/testsuite/gcc.c-torture/compile/builtin_unreachable-1.c
new file mode 100644
index 00000000000..dd32ca8066d
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/builtin_unreachable-1.c
@@ -0,0 +1,6 @@
+void bar (const char *);
+void foo (void)
+{
+ bar ("foo");
+ __builtin_unreachable ();
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/fix-trunc-mem-1.c b/gcc/testsuite/gcc.c-torture/compile/fix-trunc-mem-1.c
index 739726db92b..dbd4282592c 100644
--- a/gcc/testsuite/gcc.c-torture/compile/fix-trunc-mem-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/fix-trunc-mem-1.c
@@ -1,6 +1,6 @@
/* PR target/14201 */
/* Excercise float -> integer in memory patterns. */
-/* { dg-options "-mieee" { target alpha*-*-* } } */
+/* { dg-add-options ieee } */
void f1 (float v, int *p) { *p = v; }
void f2 (float v, unsigned int*p) { *p = v; }
diff --git a/gcc/testsuite/gcc.dg/20090902-1.c b/gcc/testsuite/gcc.dg/20090902-1.c
new file mode 100644
index 00000000000..6120ee90704
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/20090902-1.c
@@ -0,0 +1,3 @@
+/* { dg-do compile } */
+#define STRING(x) #x
+char buf[] = STRING(L'\x123');
diff --git a/gcc/testsuite/gcc.dg/builtin-object-size-9.c b/gcc/testsuite/gcc.dg/builtin-object-size-9.c
new file mode 100644
index 00000000000..f134aaca0d6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-object-size-9.c
@@ -0,0 +1,31 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+typedef __SIZE_TYPE__ size_t;
+extern void *malloc (size_t);
+extern void free (void *);
+extern void abort (void);
+
+union U
+{
+ struct S { int a; int b; } s;
+ int t;
+};
+
+struct T
+{
+ int c;
+ char d[1];
+};
+
+int
+main (void)
+{
+ union U *u = malloc (sizeof (struct S) + sizeof (struct T) + 6);
+ struct T *t = (struct T *) (&u->s + 1);
+ if (__builtin_object_size (t->d, 1)
+ != sizeof (struct T) + 6 - __builtin_offsetof (struct T, d))
+ abort ();
+ free (u);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/gomp/combined-1.c b/gcc/testsuite/gcc.dg/gomp/combined-1.c
index 7e2346572a2..dfed647371f 100644
--- a/gcc/testsuite/gcc.dg/gomp/combined-1.c
+++ b/gcc/testsuite/gcc.dg/gomp/combined-1.c
@@ -20,5 +20,5 @@ int foo (void)
}
}
-/* { dg-final { scan-tree-dump-times "__builtin_GOMP_parallel_loop_runtime_start" 3 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "GOMP_parallel_loop_runtime_start" 3 "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/guality/example.c b/gcc/testsuite/gcc.dg/guality/example.c
new file mode 100644
index 00000000000..26d25c28590
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/example.c
@@ -0,0 +1,138 @@
+/* { dg-do run { xfail *-*-* } } */
+/* { dg-options "-g" } */
+
+#define GUALITY_DONT_FORCE_LIVE_AFTER -1
+
+#ifndef STATIC_INLINE
+#define STATIC_INLINE /*static*/
+#endif
+
+#include "guality.h"
+
+#include <assert.h>
+
+/* Test the debug info for the functions used in the VTA
+ presentation at the GCC Summit 2008. */
+
+typedef struct list {
+ struct list *n;
+ int v;
+} elt, *node;
+
+STATIC_INLINE node
+find_val (node c, int v, node e)
+{
+ while (c < e)
+ {
+ GUALCHK (c);
+ GUALCHK (v);
+ GUALCHK (e);
+ if (c->v == v)
+ return c;
+ GUALCHK (c);
+ GUALCHK (v);
+ GUALCHK (e);
+ c++;
+ }
+ return NULL;
+}
+
+STATIC_INLINE node
+find_prev (node c, node w)
+{
+ while (c)
+ {
+ node o = c;
+ c = c->n;
+ GUALCHK (c);
+ GUALCHK (o);
+ GUALCHK (w);
+ if (c == w)
+ return o;
+ GUALCHK (c);
+ GUALCHK (o);
+ GUALCHK (w);
+ }
+ return NULL;
+}
+
+STATIC_INLINE node
+check_arr (node c, node e)
+{
+ if (c == e)
+ return NULL;
+ e--;
+ while (c < e)
+ {
+ GUALCHK (c);
+ GUALCHK (e);
+ if (c->v > (c+1)->v)
+ return c;
+ GUALCHK (c);
+ GUALCHK (e);
+ c++;
+ }
+ return NULL;
+}
+
+STATIC_INLINE node
+check_list (node c, node t)
+{
+ while (c != t)
+ {
+ node n = c->n;
+ GUALCHK (c);
+ GUALCHK (n);
+ GUALCHK (t);
+ if (c->v > n->v)
+ return c;
+ GUALCHK (c);
+ GUALCHK (n);
+ GUALCHK (t);
+ c = n;
+ }
+ return NULL;
+}
+
+struct list testme[] = {
+ { &testme[1], 2 },
+ { &testme[2], 3 },
+ { &testme[3], 5 },
+ { &testme[4], 7 },
+ { &testme[5], 11 },
+ { NULL, 13 },
+};
+
+int
+main (int argc, char *argv[])
+{
+ int n = sizeof (testme) / sizeof (*testme);
+ node first, last, begin, end, ret;
+
+ GUALCHKXPR (n);
+
+ begin = first = &testme[0];
+ last = &testme[n-1];
+ end = &testme[n];
+
+ GUALCHKXPR (first);
+ GUALCHKXPR (last);
+ GUALCHKXPR (begin);
+ GUALCHKXPR (end);
+
+ ret = find_val (begin, 13, end);
+ GUALCHK (ret);
+ assert (ret == last);
+
+ ret = find_prev (first, last);
+ GUALCHK (ret);
+ assert (ret == &testme[n-2]);
+
+ ret = check_arr (begin, end);
+ GUALCHK (ret);
+ assert (!ret);
+
+ ret = check_list (first, last);
+ GUALCHK (ret);
+ assert (!ret);
+}
diff --git a/gcc/testsuite/gcc.dg/guality/guality.c b/gcc/testsuite/gcc.dg/guality/guality.c
new file mode 100644
index 00000000000..d5d950fcdac
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/guality.c
@@ -0,0 +1,28 @@
+/* { dg-do run { xfail *-*-* } } */
+/* { dg-options "-g" } */
+
+#include "guality.h"
+
+/* Some silly sanity checking. */
+
+int
+main (int argc, char *argv[])
+{
+ int i = argc+1;
+ int j = argc-2;
+ int k = 5;
+
+ GUALCHKXPR (argc);
+ GUALCHKXPR (i);
+ GUALCHKXPR (j);
+ GUALCHKXPR (k);
+ GUALCHKXPR (&i);
+ GUALCHKFLA (argc);
+ GUALCHKFLA (i);
+ GUALCHKFLA (j);
+ GUALCHKXPR (i);
+ GUALCHKXPR (j);
+ GUALCHKXPRVAL ("k", 5, 1);
+ GUALCHKXPRVAL ("0x40", 64, 0);
+ /* GUALCHKXPRVAL ("0", 0, 0); *//* XFAIL */
+}
diff --git a/gcc/testsuite/gcc.dg/guality/guality.exp b/gcc/testsuite/gcc.dg/guality/guality.exp
new file mode 100644
index 00000000000..b151c2e0772
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/guality.exp
@@ -0,0 +1,7 @@
+# This harness is for tests that should be run at all optimisation levels.
+
+load_lib gcc-dg.exp
+
+dg-init
+gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] ""
+dg-finish
diff --git a/gcc/testsuite/gcc.dg/guality/guality.h b/gcc/testsuite/gcc.dg/guality/guality.h
new file mode 100644
index 00000000000..6025da8b028
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/guality.h
@@ -0,0 +1,330 @@
+/* Infrastructure to test the quality of debug information.
+ Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+/* This is a first cut at checking that debug information matches
+ run-time. The idea is to annotate programs with GUALCHK* macros
+ that guide the tests.
+
+ In the current implementation, all of the macros expand to function
+ calls. On the one hand, this interferes with optimizations; on the
+ other hand, it establishes an optimization barrier and a clear
+ inspection point, where previous operations (as in the abstract
+ machine) should have been completed and have their effects visible,
+ and future operations shouldn't have started yet.
+
+ In the current implementation of guality_check(), we fork a child
+ process that runs gdb, attaches to the parent process (the one that
+ called guality_check), moves up one stack frame (to the caller of
+ guality_check) and then examines the given expression.
+
+ If it matches the expected value, we have a PASS. If it differs,
+ we have a FAILure. If it is missing, we'll have a FAIL or an
+ UNRESOLVED depending on whether the variable or expression might be
+ unavailable at that point, as indicated by the third argument.
+
+ We envision a future alternate implementation with two compilation
+ and execution cycles, say one that runs the program and uses the
+ macros to log expressions and expected values, another in which the
+ macros expand to nothing and the logs are used to guide a debug
+ session that tests the values. How to identify the inspection
+ points in the second case is yet to be determined. It is
+ recommended that GUALCHK* macros be by themselves in source lines,
+ so that __FILE__ and __LINE__ will be usable to identify them.
+*/
+
+/* Attach a debugger to the current process and verify that the string
+ EXPR, evaluated by the debugger, yields the long long number VAL.
+ If the debugger cannot compute the expression, say because the
+ variable is unavailable, this will count as an error, unless unkok
+ is nonzero. */
+
+#define GUALCHKXPRVAL(expr, val, unkok) \
+ guality_check ((expr), (val), (unkok))
+
+/* Check that a debugger knows that EXPR evaluates to the run-time
+ value of EXPR. Unknown values are marked as acceptable,
+ considering that EXPR may die right after this call. This will
+ affect the generated code in that EXPR will be evaluated and forced
+ to remain live at least until right before the call to
+ guality_check, although not necessarily after the call. */
+
+#define GUALCHKXPR(expr) \
+ GUALCHKXPRVAL (#expr, (long long)(expr), 1)
+
+/* Same as GUALCHKXPR, but issue an error if the variable is optimized
+ away. */
+
+#define GUALCHKVAL(expr) \
+ GUALCHKXPRVAL (#expr, (long long)(expr), 0)
+
+/* Check that a debugger knows that EXPR evaluates to the run-time
+ value of EXPR. Unknown values are marked as errors, because the
+ value of EXPR is forced to be available right after the call, for a
+ range of at least one instruction. This will affect the generated
+ code, in that EXPR *will* be evaluated before and preserved until
+ after the call to guality_check. */
+
+#define GUALCHKFLA(expr) do { \
+ __typeof(expr) volatile __preserve_after; \
+ __typeof(expr) __preserve_before = (expr); \
+ GUALCHKXPRVAL (#expr, (long long)(__preserve_before), 0); \
+ __preserve_after = __preserve_before; \
+ asm ("" : : "m" (__preserve_after)); \
+ } while (0)
+
+/* GUALCHK is the simplest way to assert that debug information for an
+ expression matches its run-time value. Whether to force the
+ expression live after the call, so as to flag incompleteness
+ errors, can be disabled by defining GUALITY_DONT_FORCE_LIVE_AFTER.
+ Setting it to -1, an error is issued for optimized out variables,
+ even though they are not forced live. */
+
+#if ! GUALITY_DONT_FORCE_LIVE_AFTER
+#define GUALCHK(var) GUALCHKFLA(var)
+#elif GUALITY_DONT_FORCE_LIVE_AFTER < 0
+#define GUALCHK(var) GUALCHKVAL(var)
+#else
+#define GUALCHK(var) GUALCHKXPR(var)
+#endif
+
+/* The name of the GDB program, with arguments to make it quiet. This
+ is GUALITY_GDB_DEFAULT GUALITY_GDB_ARGS by default, but it can be
+ overridden by setting the GUALITY_GDB environment variable, whereas
+ GUALITY_GDB_DEFAULT can be overridden by setting the
+ GUALITY_GDB_NAME environment variable. */
+
+static const char *guality_gdb_command;
+#define GUALITY_GDB_DEFAULT "gdb"
+#define GUALITY_GDB_ARGS " -nx -nw --quiet > /dev/null 2>&1"
+
+/* Kinds of results communicated as exit status from child process
+ that runs gdb to the parent process that's being monitored. */
+
+enum guality_counter { PASS, INCORRECT, INCOMPLETE };
+
+/* Count of passes and errors. */
+
+static int guality_count[INCOMPLETE+1];
+
+/* If --guality-skip is given in the command line, all the monitoring,
+ forking and debugger-attaching action will be disabled. This is
+ useful to run the monitor program within a debugger. */
+
+static int guality_skip;
+
+/* This is a file descriptor to which we'll issue gdb commands to
+ probe and test. */
+FILE *guality_gdb_input;
+
+/* This holds the line number where we're supposed to set a
+ breakpoint. */
+int guality_breakpoint_line;
+
+/* GDB should set this to true once it's connected. */
+int volatile guality_attached;
+
+/* This function is the main guality program. It may actually be
+ defined as main, because we #define main to it afterwards. Because
+ of this wrapping, guality_main may not have an empty argument
+ list. */
+
+extern int guality_main (int argc, char *argv[]);
+
+static void __attribute__((noinline))
+guality_check (const char *name, long long value, int unknown_ok);
+
+/* Set things up, run guality_main, then print a summary and quit. */
+
+int
+main (int argc, char *argv[])
+{
+ int i;
+ char *argv0 = argv[0];
+
+ guality_gdb_command = getenv ("GUALITY_GDB");
+ if (!guality_gdb_command)
+ {
+ guality_gdb_command = getenv ("GUALITY_GDB_NAME");
+ if (!guality_gdb_command)
+ guality_gdb_command = GUALITY_GDB_DEFAULT GUALITY_GDB_ARGS;
+ else
+ {
+ int len = strlen (guality_gdb_command) + sizeof (GUALITY_GDB_ARGS);
+ char *buf = __builtin_alloca (len);
+ strcpy (buf, guality_gdb_command);
+ strcat (buf, GUALITY_GDB_ARGS);
+ guality_gdb_command = buf;
+ }
+ }
+
+ for (i = 1; i < argc; i++)
+ if (strcmp (argv[i], "--guality-skip") == 0)
+ guality_skip = 1;
+ else
+ break;
+
+ if (!guality_skip)
+ {
+ guality_gdb_input = popen (guality_gdb_command, "w");
+ /* This call sets guality_breakpoint_line. */
+ guality_check (NULL, 0, 0);
+ if (!guality_gdb_input
+ || fprintf (guality_gdb_input, "\
+set height 0\n\
+attach %i\n\
+set guality_attached = 1\n\
+b %i\n\
+continue\n\
+", (int)getpid (), guality_breakpoint_line) <= 0
+ || fflush (guality_gdb_input))
+ {
+ perror ("gdb");
+ abort ();
+ }
+ }
+
+ argv[--i] = argv0;
+
+ guality_main (argc - i, argv + i);
+
+ i = guality_count[INCORRECT];
+
+ fprintf (stderr, "%s: %i PASS, %i FAIL, %i UNRESOLVED\n",
+ i ? "FAIL" : "PASS",
+ guality_count[PASS], guality_count[INCORRECT],
+ guality_count[INCOMPLETE]);
+
+ return i;
+}
+
+#define main guality_main
+
+/* Tell the GDB child process to evaluate NAME in the caller. If it
+ matches VALUE, we have a PASS; if it's unknown and UNKNOWN_OK, we
+ have an UNRESOLVED. Otherwise, it's a FAIL. */
+
+static void __attribute__((noinline))
+guality_check (const char *name, long long value, int unknown_ok)
+{
+ int result;
+
+ if (guality_skip)
+ return;
+
+ {
+ volatile long long xvalue = -1;
+ volatile int unavailable = 0;
+ if (name)
+ {
+ /* The sequence below cannot distinguish an optimized away
+ variable from one mapped to a non-lvalue zero. */
+ if (fprintf (guality_gdb_input, "\
+up\n\
+set $value1 = 0\n\
+set $value1 = (%s)\n\
+set $value2 = -1\n\
+set $value2 = (%s)\n\
+set $value3 = $value1 - 1\n\
+set $value4 = $value1 + 1\n\
+set $value3 = (%s)++\n\
+set $value4 = --(%s)\n\
+down\n\
+set xvalue = $value1\n\
+set unavailable = $value1 != $value2 ? -1 : $value3 != $value4 ? 1 : 0\n\
+continue\n\
+", name, name, name, name) <= 0
+ || fflush (guality_gdb_input))
+ {
+ perror ("gdb");
+ abort ();
+ }
+ else if (!guality_attached)
+ {
+ unsigned int timeout = 0;
+
+ /* Give GDB some more time to attach. Wrapping around a
+ 32-bit counter takes some seconds, it should be plenty
+ of time for GDB to get a chance to start up and attach,
+ but not long enough that, if GDB is unavailable or
+ broken, we'll take far too long to give up. */
+ while (--timeout && !guality_attached)
+ ;
+ if (!timeout && !guality_attached)
+ {
+ fprintf (stderr, "gdb: took too long to attach\n");
+ abort ();
+ }
+ }
+ }
+ else
+ {
+ guality_breakpoint_line = __LINE__ + 5;
+ return;
+ }
+ /* Do NOT add lines between the __LINE__ above and the line below,
+ without also adjusting the added constant to match. */
+ if (!unavailable || (unavailable > 0 && xvalue))
+ {
+ if (xvalue == value)
+ result = PASS;
+ else
+ result = INCORRECT;
+ }
+ else
+ result = INCOMPLETE;
+ asm ("" : : "X" (name), "X" (value), "X" (unknown_ok), "m" (xvalue));
+ switch (result)
+ {
+ case PASS:
+ fprintf (stderr, "PASS: %s is %lli\n", name, value);
+ break;
+ case INCORRECT:
+ fprintf (stderr, "FAIL: %s is %lli, not %lli\n", name, xvalue, value);
+ break;
+ case INCOMPLETE:
+ fprintf (stderr, "%s: %s is %s, expected %lli\n",
+ unknown_ok ? "UNRESOLVED" : "FAIL", name,
+ unavailable < 0 ? "not computable" : "optimized away", value);
+ result = unknown_ok ? INCOMPLETE : INCORRECT;
+ break;
+ default:
+ abort ();
+ }
+ }
+
+ switch (result)
+ {
+ case PASS:
+ case INCORRECT:
+ case INCOMPLETE:
+ ++guality_count[result];
+ break;
+
+ default:
+ abort ();
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/memcpy-1.c b/gcc/testsuite/gcc.dg/memcpy-1.c
index 2b11098b286..0952a261ad0 100644
--- a/gcc/testsuite/gcc.dg/memcpy-1.c
+++ b/gcc/testsuite/gcc.dg/memcpy-1.c
@@ -1,7 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */
/* PR36598 AVR fail maybe due to cost metrics */
-/* { dg-final { scan-tree-dump-times "nasty_local" 0 "optimized" { xfail { "avr-*-*" } } } } */
+/* { dg-final { scan-tree-dump-times "nasty_local\\." 0 "optimized" { xfail { "avr-*-*" } } } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
struct a {int a,b,c;} a;
int test(struct a a)
diff --git a/gcc/testsuite/gcc.dg/pr28796-2.c b/gcc/testsuite/gcc.dg/pr28796-2.c
index 17fd1584dde..f56a5d4a444 100644
--- a/gcc/testsuite/gcc.dg/pr28796-2.c
+++ b/gcc/testsuite/gcc.dg/pr28796-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -funsafe-math-optimizations -fno-finite-math-only -DUNSAFE" } */
-/* { dg-options "-mieee -O2 -funsafe-math-optimizations -fno-finite-math-only -DUNSAFE" { target alpha*-*-* } } */
+/* { dg-add-options ieee } */
/* { dg-skip-if "No Inf/NaN support" { spu-*-* } } */
#include "tg-tests.h"
diff --git a/gcc/testsuite/gcc.dg/torture/builtin-math-7.c b/gcc/testsuite/gcc.dg/torture/builtin-math-7.c
index eaea86fd732..edd82e032fa 100644
--- a/gcc/testsuite/gcc.dg/torture/builtin-math-7.c
+++ b/gcc/testsuite/gcc.dg/torture/builtin-math-7.c
@@ -6,7 +6,7 @@
/* { dg-do run } */
/* { dg-require-effective-target mpc } */
-/* { dg-options "-mieee" { target sh*-*-* } } */
+/* { dg-add-options ieee } */
extern void link_error(int);
diff --git a/gcc/testsuite/gcc.dg/torture/type-generic-1.c b/gcc/testsuite/gcc.dg/torture/type-generic-1.c
index 96b5d01e5f6..add83c09815 100644
--- a/gcc/testsuite/gcc.dg/torture/type-generic-1.c
+++ b/gcc/testsuite/gcc.dg/torture/type-generic-1.c
@@ -2,8 +2,8 @@
without any fast-math flags. */
/* { dg-do run } */
-/* { dg-options "-mieee" { target alpha*-*-* sh*-*-* } } */
/* { dg-skip-if "No Inf/NaN support" { spu-*-* } } */
+/* { dg-add-options ieee } */
#include "../tg-tests.h"
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/inline-3.c b/gcc/testsuite/gcc.dg/tree-ssa/inline-3.c
index f7ebb33d2a5..13e27c307a4 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/inline-3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/inline-3.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-einline2" } */
+/* { dg-options "-O2 -fdump-tree-einline2 -fpie" { target { ! nonpic } } } */
extern void inlined ();
void inline_me_too (void);
void inline_through_me (void (*ptr)(void));
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/local-pure-const.c b/gcc/testsuite/gcc.dg/tree-ssa/local-pure-const.c
index 2c7353dbdbc..065d212cb5f 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/local-pure-const.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/local-pure-const.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-local-pure-const1" } */
+/* { dg-options "-O1 -fdump-tree-local-pure-const1 -fpie" { target { ! nonpic } } } */
t(int a, int b, int c)
{
int *p;
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/sra-8.c b/gcc/testsuite/gcc.dg/tree-ssa/sra-8.c
new file mode 100644
index 00000000000..d43bbe0d8a3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/sra-8.c
@@ -0,0 +1,35 @@
+/* A testcase for PR 40744. We do not want to create replacements for object
+ that are dead or have only a single use, whenever it can be avoided
+ simply. */
+/* { dg-do compile } */
+/* { dg-options "-O1 -fdump-tree-esra-details" } */
+
+struct X { int i; int j; };
+
+void foo(void)
+{
+ struct X x;
+ x.i = 1;
+ x.j = 2;
+}
+
+
+int bar(struct X x)
+{
+ return x.i;
+}
+
+
+extern void do_something (struct X);
+
+void bar2(int i, int j)
+{
+ struct X x;
+
+ x.i = i;
+ x.j = j;
+ do_something (x);
+}
+
+/* { dg-final { scan-tree-dump-times "Created a replacement" 0 "esra"} } */
+/* { dg-final { cleanup-tree-dump "esra" } } */
diff --git a/gcc/testsuite/gcc.dg/uninit-I.c b/gcc/testsuite/gcc.dg/uninit-I.c
index 7be60d786b8..064e42d55d0 100644
--- a/gcc/testsuite/gcc.dg/uninit-I.c
+++ b/gcc/testsuite/gcc.dg/uninit-I.c
@@ -3,6 +3,6 @@
int sys_msgctl (void)
{
- struct { int mode; } setbuf; /* { dg-warning "'setbuf\.mode' is used" } */
+ struct { int mode; } setbuf; /* { dg-warning "'setbuf\.mode' is used" "" { xfail *-*-* } } */
return setbuf.mode;
}
diff --git a/gcc/testsuite/gcc.target/i386/funcspec-5.c b/gcc/testsuite/gcc.target/i386/funcspec-5.c
index d60f96aecdb..cbecfaad56d 100644
--- a/gcc/testsuite/gcc.target/i386/funcspec-5.c
+++ b/gcc/testsuite/gcc.target/i386/funcspec-5.c
@@ -5,7 +5,6 @@
extern void test_abm (void) __attribute__((__target__("abm")));
extern void test_aes (void) __attribute__((__target__("aes")));
-extern void test_fused_madd (void) __attribute__((__target__("fused-madd")));
extern void test_mmx (void) __attribute__((__target__("mmx")));
extern void test_pclmul (void) __attribute__((__target__("pclmul")));
extern void test_popcnt (void) __attribute__((__target__("popcnt")));
@@ -21,7 +20,6 @@ extern void test_ssse3 (void) __attribute__((__target__("ssse3")));
extern void test_no_abm (void) __attribute__((__target__("no-abm")));
extern void test_no_aes (void) __attribute__((__target__("no-aes")));
-extern void test_no_fused_madd (void) __attribute__((__target__("no-fused-madd")));
extern void test_no_mmx (void) __attribute__((__target__("no-mmx")));
extern void test_no_pclmul (void) __attribute__((__target__("no-pclmul")));
extern void test_no_popcnt (void) __attribute__((__target__("no-popcnt")));
diff --git a/gcc/testsuite/gfortran.dg/allocatable_scalar_1.f90 b/gcc/testsuite/gfortran.dg/allocatable_scalar_1.f90
new file mode 100644
index 00000000000..d83d2f7f72b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/allocatable_scalar_1.f90
@@ -0,0 +1,18 @@
+! { dg-do run }
+!
+! PR 40996: [F03] ALLOCATABLE scalars
+!
+! Contributed by Janus Weil <janus@gcc.gnu.org>
+
+implicit none
+real, allocatable :: scalar
+
+allocate(scalar)
+scalar = exp(1.)
+print *,scalar
+if (.not. allocated(scalar)) call abort()
+deallocate(scalar)
+if (allocated(scalar)) call abort()
+
+end
+
diff --git a/gcc/testsuite/gfortran.dg/allocatable_scalar_2.f90 b/gcc/testsuite/gfortran.dg/allocatable_scalar_2.f90
new file mode 100644
index 00000000000..5ad58ca38ab
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/allocatable_scalar_2.f90
@@ -0,0 +1,11 @@
+! { dg-do compile }
+! { dg-options "-std=f95" }
+
+! Parsing of finalizer procedure definitions.
+! While ALLOCATABLE scalars are not implemented, this even used to ICE.
+! Thanks Tobias Burnus for the test!
+
+integer, allocatable :: x ! { dg-error "may not be ALLOCATABLE" }
+
+end
+
diff --git a/gcc/testsuite/gfortran.dg/allocate_derived_1.f90 b/gcc/testsuite/gfortran.dg/allocate_derived_1.f90
new file mode 100644
index 00000000000..d74851ef0b0
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/allocate_derived_1.f90
@@ -0,0 +1,53 @@
+! { dg-do compile }
+!
+! FIXME: Remove -w after polymorphic entities are supported.
+! { dg-options "-w" }
+!
+! ALLOCATE statements with derived type specification
+!
+! Contributed by Janus Weil <janus@gcc.gnu.org>
+
+ type :: t1
+ integer :: i
+ end type
+
+ type, extends(t1) :: t2
+ real :: r
+ end type
+
+ type, extends(t2) :: t3
+ real :: q
+ end type
+
+ type, abstract :: u0
+ logical :: nothing
+ end type
+
+ type :: v1
+ real :: r
+ end type
+
+ class(t1),dimension(:),allocatable :: x
+ type(t2),dimension(:),allocatable :: y
+ class(t3),dimension(:),allocatable :: z
+
+ allocate( x(1))
+ allocate(t1 :: x(2))
+ allocate(t2 :: x(3))
+ allocate(t3 :: x(4))
+ allocate(tx :: x(5)) ! { dg-error "is not an accessible derived type" }
+ allocate(u0 :: x(6)) ! { dg-error "may not be ABSTRACT" }
+ allocate(v1 :: x(7)) ! { dg-error "is type incompatible with typespec" }
+
+ allocate( y(1))
+ allocate(t1 :: y(2)) ! { dg-error "is type incompatible with typespec" }
+ allocate(t2 :: y(3))
+ allocate(t3 :: y(3)) ! { dg-error "is type incompatible with typespec" }
+
+ allocate( z(1))
+ allocate(t1 :: z(2)) ! { dg-error "is type incompatible with typespec" }
+ allocate(t2 :: z(3)) ! { dg-error "is type incompatible with typespec" }
+ allocate(t3 :: z(4))
+
+end
+
diff --git a/gcc/testsuite/gfortran.dg/boz_14.f90 b/gcc/testsuite/gfortran.dg/boz_14.f90
index dd7e58e7c2c..1e571780eee 100644
--- a/gcc/testsuite/gfortran.dg/boz_14.f90
+++ b/gcc/testsuite/gfortran.dg/boz_14.f90
@@ -1,5 +1,5 @@
! { dg-do run }
-! { dg-options "-mieee" { target alpha*-*-* } }
+! { dg-add-options ieee }
! PR fortran/36214
! For BOZ-initialization of floats, the precision used to be wrong sometimes.
diff --git a/gcc/testsuite/gfortran.dg/class_3.f03 b/gcc/testsuite/gfortran.dg/class_3.f03
new file mode 100644
index 00000000000..8e15f0e57a5
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/class_3.f03
@@ -0,0 +1,15 @@
+! { dg-do compile }
+! { dg-options "-std=f95" }
+!
+! PR 40940: [F03] CLASS statement
+!
+! Contributed by Janus Weil <janus@gcc.gnu.org>
+
+ type :: t
+ integer :: comp
+ end type
+
+ class(t), pointer :: cl ! { dg-error "CLASS statement" }
+
+end
+
diff --git a/gcc/testsuite/gfortran.dg/erf_2.F90 b/gcc/testsuite/gfortran.dg/erf_2.F90
index d418d5fccb9..087dfd38e19 100644
--- a/gcc/testsuite/gfortran.dg/erf_2.F90
+++ b/gcc/testsuite/gfortran.dg/erf_2.F90
@@ -1,6 +1,6 @@
! { dg-do run }
! { dg-options "-fno-range-check -ffree-line-length-none " }
-! { dg-options "-fno-range-check -ffree-line-length-none -mieee" { target alpha*-*-* } } */
+! { dg-add-options ieee }
!
! Check that simplification functions and runtime library agree on ERF,
! ERFC and ERFC_SCALED.
diff --git a/gcc/testsuite/gfortran.dg/init_flag_3.f90 b/gcc/testsuite/gfortran.dg/init_flag_3.f90
index 4a3fd1eb306..e4426177ab6 100644
--- a/gcc/testsuite/gfortran.dg/init_flag_3.f90
+++ b/gcc/testsuite/gfortran.dg/init_flag_3.f90
@@ -1,6 +1,6 @@
! { dg-do run }
! { dg-options "-finit-integer=-1 -finit-logical=false -finit-real=nan" }
-! { dg-options "-finit-integer=-1 -finit-logical=false -finit-real=nan -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
program init_flag_3
diff --git a/gcc/testsuite/gfortran.dg/init_flag_4.f90 b/gcc/testsuite/gfortran.dg/init_flag_4.f90
index 8e1265e9347..b79ec61f115 100644
--- a/gcc/testsuite/gfortran.dg/init_flag_4.f90
+++ b/gcc/testsuite/gfortran.dg/init_flag_4.f90
@@ -1,6 +1,6 @@
! { dg-do run }
! { dg-options "-finit-real=inf" }
-! { dg-options "-finit-real=inf -mieee" { target alpha*-*-* } } */
+! { dg-add-options ieee }
program init_flag_4
call real_test
diff --git a/gcc/testsuite/gfortran.dg/init_flag_5.f90 b/gcc/testsuite/gfortran.dg/init_flag_5.f90
index 5531251b00f..54f891f49e8 100644
--- a/gcc/testsuite/gfortran.dg/init_flag_5.f90
+++ b/gcc/testsuite/gfortran.dg/init_flag_5.f90
@@ -1,6 +1,6 @@
! { dg-do run }
! { dg-options "-finit-real=-inf" }
-! { dg-options "-finit-real=-inf -mieee" { target alpha*-*-* } } */
+! { dg-add-options ieee }
program init_flag_5
call real_test
diff --git a/gcc/testsuite/gfortran.dg/integer_exponentiation_1.f90 b/gcc/testsuite/gfortran.dg/integer_exponentiation_1.f90
index 77ef84c2e92..4dcb3a44cd5 100644
--- a/gcc/testsuite/gfortran.dg/integer_exponentiation_1.f90
+++ b/gcc/testsuite/gfortran.dg/integer_exponentiation_1.f90
@@ -1,5 +1,5 @@
! { dg-do run }
-! { dg-options "-pedantic -mieee" { target alpha*-*-* } }
+! { dg-add-options ieee }
! PR 30981 - this used to go into an endless loop during execution.
program test
a = 3.0
diff --git a/gcc/testsuite/gfortran.dg/integer_exponentiation_5.F90 b/gcc/testsuite/gfortran.dg/integer_exponentiation_5.F90
index fe431ba14e9..58c7614d514 100644
--- a/gcc/testsuite/gfortran.dg/integer_exponentiation_5.F90
+++ b/gcc/testsuite/gfortran.dg/integer_exponentiation_5.F90
@@ -1,7 +1,7 @@
! { dg-do run { xfail spu-*-* } }
! FAILs on SPU because of invalid result of 1.0/0.0 inline code
! { dg-options "-fno-range-check" }
-! { dg-options "-fno-range-check -mieee" { target alpha*-*-* } } */
+! { dg-add-options ieee }
module mod_check
implicit none
diff --git a/gcc/testsuite/gfortran.dg/isnan_1.f90 b/gcc/testsuite/gfortran.dg/isnan_1.f90
index 47187432bf2..89e4cd35ba2 100644
--- a/gcc/testsuite/gfortran.dg/isnan_1.f90
+++ b/gcc/testsuite/gfortran.dg/isnan_1.f90
@@ -1,7 +1,7 @@
! Test for the ISNAN intrinsic
!
! { dg-do run }
-! { dg-options "-pedantic-errors -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
!
implicit none
diff --git a/gcc/testsuite/gfortran.dg/isnan_2.f90 b/gcc/testsuite/gfortran.dg/isnan_2.f90
index fe6e9314613..455ecef1f7a 100644
--- a/gcc/testsuite/gfortran.dg/isnan_2.f90
+++ b/gcc/testsuite/gfortran.dg/isnan_2.f90
@@ -2,7 +2,7 @@
!
! { dg-do run }
! { dg-options "-fno-range-check" }
-! { dg-options "-fno-range-check -pedantic-errors -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
!
implicit none
diff --git a/gcc/testsuite/gfortran.dg/line_length_3.f b/gcc/testsuite/gfortran.dg/line_length_3.f
new file mode 100644
index 00000000000..653246a1fc1
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/line_length_3.f
@@ -0,0 +1,23 @@
+! { dg-do compile }
+! { dg-options "-std=gnu -ffixed-form -Wline-truncation" }
+! PR39229 No warning of truncated lines if a continuation line follows
+ ! expected: no warning by default (as column 73+ is often used for )
+ ! comments in fixed-form source code.
+ ! however, with -wline-truncation there shall be a warning.
+ implicit none
+ call foo([11, 22, 33, 44, 55, 66, 770, 9900, 1100, 1100, 120], 12 warn
+ & , 'hello')
+ print *, min(35
+ 1 , 25 warn
+ 2 )
+ contains
+ subroutine foo(a,n,s)
+ integer :: a(*), n, i
+ character(len=*) :: s
+ do i = 1, n
+ print *, s, a(i)
+ end do
+ end subroutine foo
+ end
+! { dg-warning "Line truncated" " " { target *-*-* } 8 }
+! { dg-warning "Line truncated" " " { target *-*-* } 11 }
diff --git a/gcc/testsuite/gfortran.dg/line_length_4.f90 b/gcc/testsuite/gfortran.dg/line_length_4.f90
new file mode 100644
index 00000000000..52bba1c874e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/line_length_4.f90
@@ -0,0 +1,18 @@
+! { dg-do compile }
+! { dg-options "-Wline-truncation -ffree-line-length-80" }
+! PR39229 No warning of truncated lines if a continuation line follows
+ implicit none
+ call foo([11, 22, 33, 44, 55, 66, 770, 9900, 1100, 1100, 120],11,'hello') !no warn
+
+ print *, min(35 &
+ & , 25 ), " Explanation ! " warn
+ contains
+ subroutine foo(a,n,s)
+ integer :: a(*), n, i
+ character(len=*) :: s
+ do i = 1, n
+ print *, s, a(i)
+ end do
+ end subroutine foo
+ end
+! { dg-warning "Line truncated" " " { target *-*-* } 8 }
diff --git a/gcc/testsuite/gfortran.dg/maxlocval_2.f90 b/gcc/testsuite/gfortran.dg/maxlocval_2.f90
index afbfee030fe..5f6b913b0f4 100644
--- a/gcc/testsuite/gfortran.dg/maxlocval_2.f90
+++ b/gcc/testsuite/gfortran.dg/maxlocval_2.f90
@@ -1,5 +1,5 @@
! { dg-do run }
-! { dg-options "-mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
real :: a(3), nan, minf, pinf
real, allocatable :: c(:)
diff --git a/gcc/testsuite/gfortran.dg/maxlocval_4.f90 b/gcc/testsuite/gfortran.dg/maxlocval_4.f90
index 8edf5357c31..029abe3d1a7 100644
--- a/gcc/testsuite/gfortran.dg/maxlocval_4.f90
+++ b/gcc/testsuite/gfortran.dg/maxlocval_4.f90
@@ -1,5 +1,5 @@
! { dg-do run }
-! { dg-options "-mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
real :: a(3,3), b(3), nan, minf, pinf, h
logical :: l, l2
diff --git a/gcc/testsuite/gfortran.dg/minlocval_1.f90 b/gcc/testsuite/gfortran.dg/minlocval_1.f90
index b66499afca9..261cab346a9 100644
--- a/gcc/testsuite/gfortran.dg/minlocval_1.f90
+++ b/gcc/testsuite/gfortran.dg/minlocval_1.f90
@@ -1,5 +1,5 @@
! { dg-do run }
-! { dg-options "-mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
real :: a(3), nan, minf, pinf
real, allocatable :: c(:)
diff --git a/gcc/testsuite/gfortran.dg/minlocval_4.f90 b/gcc/testsuite/gfortran.dg/minlocval_4.f90
index 5332e823a7e..c42b0194421 100644
--- a/gcc/testsuite/gfortran.dg/minlocval_4.f90
+++ b/gcc/testsuite/gfortran.dg/minlocval_4.f90
@@ -1,5 +1,5 @@
! { dg-do run }
-! { dg-options "-mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
real :: a(3,3), b(3), nan, minf, pinf, h
logical :: l, l2
diff --git a/gcc/testsuite/gfortran.dg/module_nan.f90 b/gcc/testsuite/gfortran.dg/module_nan.f90
index d6db6fb054b..ed841a891ab 100644
--- a/gcc/testsuite/gfortran.dg/module_nan.f90
+++ b/gcc/testsuite/gfortran.dg/module_nan.f90
@@ -1,6 +1,6 @@
! { dg-do run }
! { dg-options "-fno-range-check" }
-! { dg-options "-fno-range-check -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
!
! PR fortran/34318
diff --git a/gcc/testsuite/gfortran.dg/namelist_42.f90 b/gcc/testsuite/gfortran.dg/namelist_42.f90
index 476c1196caa..f15914ff117 100644
--- a/gcc/testsuite/gfortran.dg/namelist_42.f90
+++ b/gcc/testsuite/gfortran.dg/namelist_42.f90
@@ -1,5 +1,5 @@
! { dg-do run { target fd_truncate } }
-! { dg-options "-mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
!
! PR fortran/34427
diff --git a/gcc/testsuite/gfortran.dg/namelist_43.f90 b/gcc/testsuite/gfortran.dg/namelist_43.f90
index fbfd3d5e69d..d2f077e9c48 100644
--- a/gcc/testsuite/gfortran.dg/namelist_43.f90
+++ b/gcc/testsuite/gfortran.dg/namelist_43.f90
@@ -1,5 +1,5 @@
! { dg-do run }
-! { dg-options "-mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
!
! PR fortran/34427
diff --git a/gcc/testsuite/gfortran.dg/nan_1.f90 b/gcc/testsuite/gfortran.dg/nan_1.f90
index 938c04f004d..609780d69d1 100644
--- a/gcc/testsuite/gfortran.dg/nan_1.f90
+++ b/gcc/testsuite/gfortran.dg/nan_1.f90
@@ -2,7 +2,7 @@
! as arguments
!
! { dg-do run }
-! { dg-options "-pedantic-errors -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
!
module aux2
diff --git a/gcc/testsuite/gfortran.dg/nan_2.f90 b/gcc/testsuite/gfortran.dg/nan_2.f90
index 5882fa0888e..5c821d6513e 100644
--- a/gcc/testsuite/gfortran.dg/nan_2.f90
+++ b/gcc/testsuite/gfortran.dg/nan_2.f90
@@ -1,6 +1,6 @@
! { dg-do run }
! { dg-options "-fno-range-check -pedantic" }
-! { dg-options "-fno-range-check -pedantic -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
!
! PR fortran/34333
diff --git a/gcc/testsuite/gfortran.dg/nan_3.f90 b/gcc/testsuite/gfortran.dg/nan_3.f90
index 018608b5003..0a46fdb6ce4 100644
--- a/gcc/testsuite/gfortran.dg/nan_3.f90
+++ b/gcc/testsuite/gfortran.dg/nan_3.f90
@@ -1,6 +1,6 @@
! { dg-do run }
! { dg-options "-fno-range-check" }
-! { dg-options "-fno-range-check -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
!
! PR fortran/34319
diff --git a/gcc/testsuite/gfortran.dg/nan_4.f90 b/gcc/testsuite/gfortran.dg/nan_4.f90
index 09c887e17f2..30e2a49480d 100644
--- a/gcc/testsuite/gfortran.dg/nan_4.f90
+++ b/gcc/testsuite/gfortran.dg/nan_4.f90
@@ -1,6 +1,6 @@
! { dg-do compile }
! { dg-options "-std=gnu" }
-! { dg-options "-std=gnu -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
!
! PR fortran/34398.
diff --git a/gcc/testsuite/gfortran.dg/nan_5.f90 b/gcc/testsuite/gfortran.dg/nan_5.f90
index 64886bed0cf..be1169d93d1 100644
--- a/gcc/testsuite/gfortran.dg/nan_5.f90
+++ b/gcc/testsuite/gfortran.dg/nan_5.f90
@@ -3,7 +3,7 @@
! { dg-do compile }
!
! { dg-options "-fno-range-check" }
-! { dg-options "-fno-range-check -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
implicit none
diff --git a/gcc/testsuite/gfortran.dg/nearest_1.f90 b/gcc/testsuite/gfortran.dg/nearest_1.f90
index a38f25985ca..ae9e75f1e8f 100644
--- a/gcc/testsuite/gfortran.dg/nearest_1.f90
+++ b/gcc/testsuite/gfortran.dg/nearest_1.f90
@@ -1,6 +1,6 @@
! { dg-do run }
! { dg-options "-O0 -ffloat-store" }
-! { dg-options "-O0 -ffloat-store -mieee" { target alpha*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "Denormals not supported" { spu-*-* } { "*" } { "" } }
! PR fortran/27021
! Original code submitted by Dominique d'Humieres
diff --git a/gcc/testsuite/gfortran.dg/nearest_2.f90 b/gcc/testsuite/gfortran.dg/nearest_2.f90
index 8bb47687015..c5977415bc3 100644
--- a/gcc/testsuite/gfortran.dg/nearest_2.f90
+++ b/gcc/testsuite/gfortran.dg/nearest_2.f90
@@ -1,6 +1,6 @@
! { dg-do run }
! { dg-options "-fno-range-check" }
-! { dg-options "-fno-range-check -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
!
! PR fortran/34192
!
diff --git a/gcc/testsuite/gfortran.dg/nearest_3.f90 b/gcc/testsuite/gfortran.dg/nearest_3.f90
index b2bb7e3e5b9..7d683167005 100644
--- a/gcc/testsuite/gfortran.dg/nearest_3.f90
+++ b/gcc/testsuite/gfortran.dg/nearest_3.f90
@@ -1,5 +1,5 @@
! { dg-do run }
-! { dg-options "-pedantic-errors -mieee" { target alpha*-*-* sh*-*-* } }
+! { dg-add-options ieee }
! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
!
! PR fortran/34209
diff --git a/gcc/testsuite/gfortran.dg/pr37243.f b/gcc/testsuite/gfortran.dg/pr37243.f
index 7322323d2c5..01ec0bdf886 100644
--- a/gcc/testsuite/gfortran.dg/pr37243.f
+++ b/gcc/testsuite/gfortran.dg/pr37243.f
@@ -1,6 +1,6 @@
! PR rtl-optimization/37243
! { dg-do run }
-! { dg-options "-mieee" { target alpha*-*-* } }
+! { dg-add-options ieee }
! Check if register allocator handles IR flattening correctly.
SUBROUTINE SCHMD(V,M,N,LDV)
IMPLICIT DOUBLE PRECISION(A-H,O-Z)
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_4.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_4.f90
index b52c810cdf2..0a28b5340b3 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_4.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_4.f90
@@ -51,7 +51,7 @@ contains
type(t2) :: y2
end subroutine
- subroutine foo3 (x3,y3) ! { dg-error "may not be ALLOCATABLE" }
+ subroutine foo3 (x3,y3)
type(t3),allocatable :: x3
type(t3) :: y3
end subroutine
diff --git a/gcc/testsuite/gfortran.dg/real_const_3.f90 b/gcc/testsuite/gfortran.dg/real_const_3.f90
index 6567ac74f63..f428750ed0d 100644
--- a/gcc/testsuite/gfortran.dg/real_const_3.f90
+++ b/gcc/testsuite/gfortran.dg/real_const_3.f90
@@ -1,6 +1,6 @@
!{ dg-do run }
!{ dg-options "-fno-range-check" }
-!{ dg-options "-fno-range-check -mieee" { target alpha*-*-* sh*-*-* } }
+!{ dg-add-options ieee }
!{ dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } }
! PR19310 and PR19904, allow disabling range check during compile.
! Contributed by Jerry DeLisle <jvdelisle@gcc.gnu.org>
diff --git a/gcc/testsuite/gfortran.dg/transfer_simplify_2.f90 b/gcc/testsuite/gfortran.dg/transfer_simplify_2.f90
index dbad84e1ae1..46052d0a0ec 100644
--- a/gcc/testsuite/gfortran.dg/transfer_simplify_2.f90
+++ b/gcc/testsuite/gfortran.dg/transfer_simplify_2.f90
@@ -1,6 +1,6 @@
! { dg-do run }
! { dg-options "-O2" }
-! { dg-options "-O2 -mieee" { target alpha*-*-* } }
+! { dg-add-options ieee }
! Tests the fix for the meta-bug PR31237 (TRANSFER intrinsic)
! Exercises gfc_simplify_transfer a random walk through types and shapes
! and compares its results with the middle-end version that operates on
diff --git a/gcc/testsuite/gfortran.dg/whole_file_5.f90 b/gcc/testsuite/gfortran.dg/whole_file_5.f90
index 898b4e6848e..07ba4411c4c 100644
--- a/gcc/testsuite/gfortran.dg/whole_file_5.f90
+++ b/gcc/testsuite/gfortran.dg/whole_file_5.f90
@@ -1,5 +1,6 @@
! { dg-do "compile" }
! { dg-options "-O3 -fwhole-file -fdump-tree-optimized" }
+! { dg-options "-O3 -fwhole-file -fdump-tree-optimized -fpie" { target { ! nonpic } } }
!
! Check that inlining of functions declared BEFORE usage works.
! If yes, then the dump does not contain a call to F().
@@ -15,5 +16,5 @@ PROGRAM main
print *, a
END PROGRAM
-! { dg-final { scan-tree-dump-times "= f\(\)" 0 "optimized" } }
+! { dg-final { scan-tree-dump-times "= f \\(\\)" 0 "optimized" } }
! { dg-final { cleanup-tree-dump "optimized" } }
diff --git a/gcc/testsuite/gfortran.dg/whole_file_6.f90 b/gcc/testsuite/gfortran.dg/whole_file_6.f90
index 157cfa11526..f903c7aefc5 100644
--- a/gcc/testsuite/gfortran.dg/whole_file_6.f90
+++ b/gcc/testsuite/gfortran.dg/whole_file_6.f90
@@ -1,5 +1,6 @@
! { dg-do "compile" }
! { dg-options "-O3 -fwhole-file -fdump-tree-optimized" }
+! { dg-options "-O3 -fwhole-file -fdump-tree-optimized -fpie" { target { ! nonpic } } }
!
! Check that inlining of functions declared AFTER usage works.
! If yes, then the dump does not contain a call to F().
@@ -15,5 +16,5 @@ INTEGER FUNCTION f()
f = 42.0
END FUNCTION
-! { dg-final { scan-tree-dump-times "= f\(\)" 0 "optimized" } }
+! { dg-final { scan-tree-dump-times "= f \\(\\)" 0 "optimized" } }
! { dg-final { cleanup-tree-dump "optimized" } }
diff --git a/gcc/testsuite/gnat.dg/misaligned_param.adb b/gcc/testsuite/gnat.dg/misaligned_param.adb
new file mode 100644
index 00000000000..dd591d06a83
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/misaligned_param.adb
@@ -0,0 +1,30 @@
+-- { dg-do run }
+-- { dg-options "-gnatws" }
+
+with Misaligned_Param_Pkg;
+
+procedure Misaligned_Param is
+
+ procedure Channel_Eth (Status : out Integer; Kind : out Integer);
+
+ pragma Import (External, Channel_Eth);
+ pragma Import_Valued_Procedure
+ (Channel_Eth, "channel_eth", (Integer, Integer), (VALUE, REFERENCE));
+
+ type Channel is record
+ B : Boolean;
+ Kind : Integer;
+ end record;
+ pragma Pack (Channel);
+
+ MyChan : Channel;
+ Status : Integer;
+
+begin
+ MyChan.Kind := 0;
+ Channel_Eth (Status => Status, Kind => MyChan.Kind);
+
+ if Mychan.Kind = 0 then
+ raise Program_Error;
+ end if;
+end;
diff --git a/gcc/testsuite/gnat.dg/misaligned_param_pkg.adb b/gcc/testsuite/gnat.dg/misaligned_param_pkg.adb
new file mode 100644
index 00000000000..888ed18c3ae
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/misaligned_param_pkg.adb
@@ -0,0 +1,14 @@
+package body Misaligned_Param_Pkg is
+
+ type IP is access all Integer;
+
+ function Channel_Eth (Kind : IP) return Integer;
+ pragma Export (Ada, Channel_Eth, "channel_eth");
+
+ function Channel_Eth (Kind : IP) return Integer is
+ begin
+ Kind.all := 111;
+ return 0;
+ end;
+
+end Misaligned_Param_Pkg;
diff --git a/gcc/testsuite/gnat.dg/misaligned_param_pkg.ads b/gcc/testsuite/gnat.dg/misaligned_param_pkg.ads
new file mode 100644
index 00000000000..7934c3f343e
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/misaligned_param_pkg.ads
@@ -0,0 +1,5 @@
+package Misaligned_Param_Pkg is
+
+ pragma Elaborate_Body (Misaligned_Param_Pkg);
+
+end Misaligned_Param_Pkg;
diff --git a/gcc/testsuite/gnat.dg/slice7.adb b/gcc/testsuite/gnat.dg/slice7.adb
index 3f0d3f5b3fc..bb68c1f0f17 100644
--- a/gcc/testsuite/gnat.dg/slice7.adb
+++ b/gcc/testsuite/gnat.dg/slice7.adb
@@ -27,6 +27,8 @@ procedure Slice7 is
Obj : Discrete_Type;
begin
+ Put (Convert_Put(Discrete_Type'Pos (Obj)));
+
Put (Convert_Put(Discrete_Type'Pos (Obj))
(Buffer_Start..Buffer_End));
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index 7e684171be9..feec5058214 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -449,11 +449,15 @@ proc cleanup-dump { suffix } {
# The name might include a list of options; extract the file name.
set src [file tail [lindex $testcase 0]]
remove-build-file "[file tail $src].$suffix"
+ # -fcompare-debug dumps
+ remove-build-file "[file tail $src].gk.$suffix"
# Clean up dump files for additional source files.
if [info exists additional_sources] {
foreach srcfile $additional_sources {
remove-build-file "[file tail $srcfile].$suffix"
+ # -fcompare-debug dumps
+ remove-build-file "[file tail $srcfile].gk.$suffix"
}
}
}
@@ -468,7 +472,7 @@ proc cleanup-saved-temps { args } {
set suffixes {}
# add the to-be-kept suffixes
- foreach suffix {".ii" ".i" ".s" ".o"} {
+ foreach suffix {".ii" ".i" ".s" ".o" ".gkd"} {
if {[lsearch $args $suffix] < 0} {
lappend suffixes $suffix
}
@@ -480,6 +484,8 @@ proc cleanup-saved-temps { args } {
upvar 2 name testcase
foreach suffix $suffixes {
remove-build-file "[file rootname [file tail $testcase]]$suffix"
+ # -fcompare-debug dumps
+ remove-build-file "[file rootname [file tail $testcase]].gk$suffix"
}
# Clean up saved temp files for additional source files.
@@ -487,6 +493,8 @@ proc cleanup-saved-temps { args } {
foreach srcfile $additional_sources {
foreach suffix $suffixes {
remove-build-file "[file rootname [file tail $srcfile]]$suffix"
+ # -fcompare-debug dumps
+ remove-build-file "[file rootname [file tail $srcfile]].gk$suffix"
}
}
}
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 76624adcd79..c826b863a04 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -385,7 +385,7 @@ proc check_gc_sections_available { } {
# Check if the ld used by gcc supports --gc-sections.
set gcc_spec [${tool}_target_compile "-dumpspecs" "" "none" ""]
- regsub ".*\n\*linker:\[ \t\]*\n(\[^ \t\n\]*).*" "$gcc_spec" {\1} linker
+ regsub ".*\n\\*linker:\[ \t\]*\n(\[^ \t\n\]*).*" "$gcc_spec" {\1} linker
set gcc_ld [lindex [${tool}_target_compile "-print-prog-name=$linker" "" "none" ""] 0]
set ld_output [remote_exec host "$gcc_ld" "--help"]
if { [ string first "--gc-sections" $ld_output ] >= 0 } {
@@ -2971,6 +2971,17 @@ proc add_options_for_c99_runtime { flags } {
return $flags
}
+# Add to FLAGS all the target-specific flags needed to enable
+# full IEEE compliance mode.
+
+proc add_options_for_ieee { flags } {
+ if { [istarget "alpha*-*-*"]
+ || [istarget "sh*-*-*"] } {
+ return "$flags -mieee"
+ }
+ return $flags
+}
+
# Return 1 if the target provides a full C99 runtime.
proc check_effective_target_c99_runtime { } {