]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
target-supports.exp (check_effective_target_dfp_nocache, [...]): New.
authorJanis Johnson <janis187@us.ibm.com>
Tue, 17 Jan 2006 00:09:27 +0000 (00:09 +0000)
committerJanis Johnson <janis@gcc.gnu.org>
Tue, 17 Jan 2006 00:09:27 +0000 (00:09 +0000)
* lib/target-supports.exp (check_effective_target_dfp_nocache,
check_effective_target_dfprt_nocache): New.
(check_effective_target_dfp): Use check_effective_target_dfp_nocache.
(check_effective_target_dfprt): New.
* lib/c-compat.exp (check_dfp): Remove.
(compat_dfp_setup): Use check_effective_target_dfprt_nocache.
* gcc.dg/dfp/dfp.exp: Compile, execute, or skip tests based on
level of support for decimal float.
* gcc.dg/dfp/call-by-value.c, cast.c, compare-eq-const.c,
compare-eq-d128.c, compare-eq-d32.c, compare-eq-d64.c,
compare-eq-dfp.c, compare-rel-const.c, compare-rel-d128.c,
compare-rel-d32.c, compare-rel-d64.c, compare-rel-dfp.c,
convert-bfp.c, convert-bfp-fold.c, convert-complex.c, convert-dfp.c,
convert-dfp-fold.c, convert-dfp-round.c, convert-int-fold.c,
convert-int-saturate.c, func-array.c, func-mixed.c, func-scalar.c,
func-struct.c, func-vararg-dfp.c, func-vararg-mixed.c,
func-vararg-size0.c, inf-1.c, loop-index.c, nan-1.c, nan-2.c,
operator-arith-fold.c, operator-assignment.c, operator-comma.c,
operator-cond.c, operator-logical.c, operator-unary.c, snan.c,
struct-layout-1.c, union-init.c, usual-arith-conv.c: Remove dg-do
directives.

From-SVN: r109779

45 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/dfp/call-by-value.c
gcc/testsuite/gcc.dg/dfp/cast.c
gcc/testsuite/gcc.dg/dfp/compare-eq-const.c
gcc/testsuite/gcc.dg/dfp/compare-eq-d128.c
gcc/testsuite/gcc.dg/dfp/compare-eq-d32.c
gcc/testsuite/gcc.dg/dfp/compare-eq-d64.c
gcc/testsuite/gcc.dg/dfp/compare-eq-dfp.c
gcc/testsuite/gcc.dg/dfp/compare-rel-const.c
gcc/testsuite/gcc.dg/dfp/compare-rel-d128.c
gcc/testsuite/gcc.dg/dfp/compare-rel-d32.c
gcc/testsuite/gcc.dg/dfp/compare-rel-d64.c
gcc/testsuite/gcc.dg/dfp/compare-rel-dfp.c
gcc/testsuite/gcc.dg/dfp/convert-bfp-fold.c
gcc/testsuite/gcc.dg/dfp/convert-bfp.c
gcc/testsuite/gcc.dg/dfp/convert-complex.c
gcc/testsuite/gcc.dg/dfp/convert-dfp-fold.c
gcc/testsuite/gcc.dg/dfp/convert-dfp-round.c
gcc/testsuite/gcc.dg/dfp/convert-dfp.c
gcc/testsuite/gcc.dg/dfp/convert-int-fold.c
gcc/testsuite/gcc.dg/dfp/convert-int-saturate.c
gcc/testsuite/gcc.dg/dfp/dfp.exp
gcc/testsuite/gcc.dg/dfp/func-array.c
gcc/testsuite/gcc.dg/dfp/func-mixed.c
gcc/testsuite/gcc.dg/dfp/func-scalar.c
gcc/testsuite/gcc.dg/dfp/func-struct.c
gcc/testsuite/gcc.dg/dfp/func-vararg-dfp.c
gcc/testsuite/gcc.dg/dfp/func-vararg-mixed.c
gcc/testsuite/gcc.dg/dfp/func-vararg-size0.c
gcc/testsuite/gcc.dg/dfp/inf-1.c
gcc/testsuite/gcc.dg/dfp/loop-index.c
gcc/testsuite/gcc.dg/dfp/nan-1.c
gcc/testsuite/gcc.dg/dfp/nan-2.c
gcc/testsuite/gcc.dg/dfp/operator-arith-fold.c
gcc/testsuite/gcc.dg/dfp/operator-assignment.c
gcc/testsuite/gcc.dg/dfp/operator-comma.c
gcc/testsuite/gcc.dg/dfp/operator-cond.c
gcc/testsuite/gcc.dg/dfp/operator-logical.c
gcc/testsuite/gcc.dg/dfp/operator-unary.c
gcc/testsuite/gcc.dg/dfp/snan.c
gcc/testsuite/gcc.dg/dfp/struct-layout-1.c
gcc/testsuite/gcc.dg/dfp/union-init.c
gcc/testsuite/gcc.dg/dfp/usual-arith-conv.c
gcc/testsuite/lib/c-compat.exp
gcc/testsuite/lib/target-supports.exp

index 498e6d3b01041cc6029ea99a94a873063ef47924..417a811f891d42b6ddd26638d95d25b0f18bd098 100644 (file)
@@ -1,3 +1,27 @@
+2006-01-16  Janis Johnson  <janis187@us.ibm.com>
+
+       * lib/target-supports.exp (check_effective_target_dfp_nocache,
+       check_effective_target_dfprt_nocache): New.
+       (check_effective_target_dfp): Use check_effective_target_dfp_nocache.
+       (check_effective_target_dfprt): New.
+       * lib/c-compat.exp (check_dfp): Remove.
+       (compat_dfp_setup): Use check_effective_target_dfprt_nocache.
+       * gcc.dg/dfp/dfp.exp: Compile, execute, or skip tests based on
+       level of support for decimal float.
+       * gcc.dg/dfp/call-by-value.c, cast.c, compare-eq-const.c,
+       compare-eq-d128.c, compare-eq-d32.c, compare-eq-d64.c,
+       compare-eq-dfp.c, compare-rel-const.c, compare-rel-d128.c,
+       compare-rel-d32.c, compare-rel-d64.c, compare-rel-dfp.c,
+       convert-bfp.c, convert-bfp-fold.c, convert-complex.c, convert-dfp.c,
+       convert-dfp-fold.c, convert-dfp-round.c, convert-int-fold.c,
+       convert-int-saturate.c, func-array.c, func-mixed.c, func-scalar.c,
+       func-struct.c, func-vararg-dfp.c, func-vararg-mixed.c,
+       func-vararg-size0.c, inf-1.c, loop-index.c, nan-1.c, nan-2.c,
+       operator-arith-fold.c, operator-assignment.c, operator-comma.c,
+       operator-cond.c, operator-logical.c, operator-unary.c, snan.c,
+       struct-layout-1.c, union-init.c, usual-arith-conv.c: Remove dg-do
+       directives.
+
 2006-01-16  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR testsuite/25741
index 1fba25f1d1a231564edd6dc24cd1f9dbc0bf1c1e..4232a30186c9f427cab7ede048d4642a66fb43f8 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99" } */
 
 /* C99 6.9.1(9) Function definitions; parameter has automatic storage.
index 7b2b6d8351962687a1c07b8a2cc721fb5ad6c027..2cc8c1a683a56242be04f496d37eb89322406afc 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99" } */
 
 /* C99 6.5.4 Cast operators.
index 55cb566154589d4deeec8ce667fed49f0024a882..dd295200f2a018deb8c8253249146776b6e75d2e 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99" } */
 
 /* C99 6.5.9 Equality operators.
index 0635aa6a6b27d331384a9b1e95624085407e94ac..158e2f90ba5fd4af972e89b4670b6ad16260ac53 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99 -O0" } */
 
 /* C99 6.5.9 Equality operators.
index d006fbe223da84166ca6d6c184fc7a484ca7638c..d5e3bb378c92d86269ad72fc841de2d65269f323 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99 -O0" } */
 
 /* C99 6.5.9 Equality operators.
index 4f2367a497f581806462cb78b7a31d3bb6a96cd6..8fa39dfcd8fc98acb8514b9955e02cb1466b2e4d 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99 -O0" } */
 
 /* C99 6.5.9 Equality operators.
index b5c302eaa2fa00d17ce671aef0ff1a9d17bacac7..4203470a4beb926418a5ebb0e04f74051356381f 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99 -O0" } */
 
 /* C99 6.5.9 Equality operators.
index 50fc9d81bd31f64165c9d62c9ddcc60f493d707a..d2dda48e6146f340f0c695a458be8b285691d1b4 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99" } */
 
 /* C99 6.5.8 Relational operators.
index db58f5b20edf1b0733bf167a1b11c755e7dbae41..0d46925c2bb5ec0a6b4f1ed0cf47b20a8e1b747d 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99 -O0" } */
 
 /* C99 6.5.8 Relational operators.
index 128e26494c7776269925dd94bd52558fcf2b5b8d..257a3c2b4df25a4ace80b42150613e473a5fbf5c 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99 -O0" } */
 
 /* C99 6.5.8 Relational operators.
index e1b9f95ca5501855c91b3faae265b28841ef2a19..73cbcee44d7b76fcbecb6dfb591d173514d80ea9 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99 -O0" } */
 
 /* C99 6.5.8 Relational operators.
index f4fd6be87b7de4f59977b1270d6d59c7d309b5ce..58523b6ab02479a5849ae509da9f8f97d12cf837 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99 -O0" } */
 
 /* C99 6.5.8 Relational operators.
index bb865075a942b09f2f40e551ce03726d010f56bb..7724e1d2c820f5af4d8ea8df0f35d3c967b04986 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do compile } */
 /* { dg-options "-std=gnu99 -O" } */
 
 /* N1150 5.2 Conversions among decimal floating types and between
index 53efdd12b50ff32d94e4e7f7225e661ca9f35873..53258489ebbfadad297cd094fd193453ed27a4fa 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99" } */
 
 /* N1150 5.2 Conversions among decimal floating types and between
index 5600dd4c742d4078ffa6bba7f32e8bcf86108286..9fa8ebe68fb107db36888238da647bef9474b6dc 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-O3" } */
 
 /* N1150 5.3 Conversions between decimal floating and complex.
index e87bfc6273955476d9bf749718dbab64cfc346d0..8ccf22e7157b52b4db7a442016f10b8f8efb860e 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do compile } */
 /* { dg-options "-std=gnu99 -O" } */
 
 /* N1150 5.2 Conversions among decimal floating types and between
index 50f616a18017f7b783735d6eecccbbdfd41cb831..87867fad8b2461914bf4339454759edb071f0f1b 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-O0 -std=gnu99" } */
 
 /* N1150 5.2: Conversions among decimal floating types and between
index 5fbbaade258073cdad4708a204956812f225778b..bafe0894b63ef4076ede7c72a36df0dd51556428 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99 -O0" } */
 
 /* N1150 5.2 Conversions among decimal floating types and between
index 38516ed059f09025707345833f173543f5db2056..99eaad833b87159260b33d929a8a519e714dc2c7 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do compile } */
 /* { dg-options "-std=gnu99 -O" } */
 
 /* N1150 5.1 Conversion between decimal floating integer.
index 3b7b5ca0e71af13ad2e085a4018d0e90e44f5cab..9aeb1d70c6e054d11177df8130227f76f3cf8c2a 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99" } */
 
 /* N1150 5.1 Conversion between decimal floating integer.
index 52b485204b64f9815203d3aa272ae3f25882400e..db5dde78175125f4e2b49848c251725fafe6d86d 100644 (file)
@@ -25,6 +25,19 @@ if { ![check_effective_target_dfp] } {
     return;
 }
 
+# If the decimal float is supported in the compiler but not yet in the
+# runtime, treat all tests as compile-only.
+global dg-do-what-default
+set save-dg-do-what-default ${dg-do-what-default}
+if { ![check_effective_target_dfprt] } {
+    verbose "dfp.exp: runtime support for decimal float does not exist" 2
+    set dg-do-what-default compile
+} else {
+    verbose "dfp.exp: runtime support for decimal float exists, use it" 2
+    set dg-do-what-default run
+}
+verbose "dfp.exp: dg-do-what-default is ${dg-do-what-default}" 2
+
 # If a testcase doesn't have special options, use these.
 global DEFAULT_CFLAGS
 if ![info exists DEFAULT_CFLAGS] then {
@@ -40,3 +53,6 @@ dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
 
 # All done.
 dg-finish
+
+set dg-do-what-default ${save-dg-do-what-default}
+verbose "dfp.exp: dg-do-what-default is ${dg-do-what-default}" 2
index e71410f032c0480fdbd62609c240809948697123..04242802071b2d8fd682591aaee0cda2252b8ee6 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99" } */
 
 /* C99 6.5.2.2 Function calls.
index c5d9650c1e2e9dcc0a6daec0e40f7774c7d8d057..0c9fbc98b7d5dde1ba832afda01c33133737c2fa 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99 -Wall" } */
 
 /* C99 6.5.2.2 Function calls.
index 743411e56cc8e9d8402ad325203a757ac994356d..66cf2e24b2949852ae847c70f2270d700762643d 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99" } */
 
 /* C99 6.5.2.2 Function calls.
index 5f1be13223a1cc030ce235d2c8a8a43835ecfd1a..c2674e62009ed313a544b229047d9d95361c9ff2 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99" } */
 
 /* C99 6.5.2.2 Function calls.
index 07340edcee31e487840b179ee82732a8aae58dac..0763ca7d4129b59b2789d0efda1a5821691714d1 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99" } */
 
 /* C99 6.5.2.2 Function calls.
index 6ee882de5ef7e0c7362f6afbeb6f4e3481c05beb..b6c2dc05b78ff3528dcd706833c1112e84a15462 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99" } */
 
 /* C99 6.5.2.2 Function calls.
index 674a522d140b04f9d63cbec8f148a21e6f25e1a7..dc94709c108d4871a392c2d0ecae84812f6a471f 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99" } */
 
 /* C99 6.5.2.2 Function calls.  */
index ae4f286a2d157f6ebfc68856b8992bdd00944339..86aa9e4cfaaa64fa46cd55b7d050c16c1e85f7b9 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99" } */
 
 /* N1150 4: Characteristics of decimal floating types (not explicit)
index 511d70cd4b071240e3c3d23eb1d7c83f21c06f52..ff52189bc151c8b450fdc7d1192b36eca6865e5a 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99" } */
 
 /* C99 6.8.5.2: The for statement.  */
index 8f2f20860484197dbf8af4086193594452f379c5..50972e0eb00602b531d5435332363963c3994047 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99" } */
 
 /* N1150 4: Characteristics of decimal floating types (not explicit)
index 848861449fae56d435000235fa2d807ad661a1dc..e8a663e74e1c3a852af9b39023220d73e57ef8f7 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99" } */
 
 /* N1150 4: Characteristics of decimal floating types (not explicit)
index d7531046fefbe6638f5d5796edf27ad1ccc538b8..2c09e760a76c0a72c7e8251c691e25576bd3a90b 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do compile } */
 /* { dg-options "-std=gnu99 -O" } */
 
 /* C99 6.5.5: Multiplicative operators.
index 79f91b47aafa32233c79b0bf3cda3540d9679282..490748f50acdc0c4378c813da30679105858baa7 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99" } */
 
 /* C99 6.5.16 Assignment operators.
index 764e176945622d311e5be454d916a07c44b4568d..904f9b3a676b89677d77b678ee65a6351a849413 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99 -O0" } */
 
 /* C99 6.5.17: Comma operator.
index cade2dce1d9f351003e1d3e9fe34ac4fba2a0912..ff712bda30b832d7157b1fa19d827c315e886c65 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99 -O0" } */
 
 /* C99 6.5.15 Conditional operator.
index 5130b113e983773cd1738e01662eb17def0848c9..90a94b078fa43fadfd459f922ee2771966e854a1 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99" } */
 
 /* C99 Logical AND operator.
index c3f67f6939b47421dbc136e7d9109e9cdbb03c98..bcf50683c0ce9f543e0b4905b616190e7d2b442b 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99" } */
 
 /* C99 6.5.3 Unary operators.  */
index 26ea259461101ab72cff09f12df33f2df0fe872c..efc6e70ee83bb631e37823dbd1ea8b7ad164ed9b 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "" } */
 
 /* FIXME: this test needs to be conditional to systems with POSIX signals.  */
index abb532771da5b52e8aed8d8b6998936a56d8e6a0..9e54e48c72646523990dbb2897622df88d0b84b4 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99" } */
 
 #include <stdarg.h>
index e4078470cfa89a725cdf2af794f028cc0993d889..fede76ba3289cf03e047f16b4c7a4a9c350adaf6 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99" } */
 
 /* Cast to union is a GNU C extension.  */
index 0c97b6ccf80e48b5d6880135ceb5c025962de0b8..584058b8cc47315fa786fca66290ce4abb89791c 100644 (file)
@@ -1,4 +1,3 @@
-/* { dg-do run } */
 /* { dg-options "-std=gnu99 -O0" } */
 
 /* N1150 5.4: Usual arithmetic conversions.
index 527058d445f33870bf72d28807703c7ce8a4114b..232ed3315db6b0a5675f1b3afe7f52059196828d 100644 (file)
@@ -1,4 +1,4 @@
-#   Copyright (C) 2002, 2003, 2005, 02005 Free Software Foundation, Inc.
+#   Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -69,13 +69,13 @@ proc compat_setup_dfp { } {
     # If there is an alternate compiler, does it support decimal float types?
     if { $compat_use_alt == 1 && $compat_same_alt == 0 } {
        compat-use-alt-compiler
-       set compat_have_dfp [check_dfp]
+       set compat_have_dfp [check_effective_target_dfprt_nocache]
        compat-use-tst-compiler
        verbose "compat_have_dfp for alt compiler: $compat_have_dfp" 2
     }
     # Does the compiler under test support it?
     if { $compat_have_dfp == 1 } {
-       set compat_have_dfp [check_dfp]
+       set compat_have_dfp [check_effective_target_dfprt_nocache]
        verbose "compat_have_dfp for tst compiler: $compat_have_dfp" 2
     }
 
@@ -87,18 +87,6 @@ proc compat_setup_dfp { } {
     }
 }
 
-# Return 1 if the compiler supports decimal float types, 0 otherwise.
-#
-# Don't use check_effective_target since this will differ depending
-# on the compiler, not the target.
-#
-proc check_dfp { } {
-    set result [string match "" [get_compiler_messages dfp2 object {
-       _Decimal32 x; _Decimal64 y; _Decimal128 z;
-    }]]
-    return $result
-}
-
 # If either compiler does not support decimal float types, skip this test.
 
 proc dg-require-compat-dfp { args } {
index 04ead2034806195ddc258934ef066b393085b627..cadef960460a29f47f770ae6acab4b8d43242b53 100644 (file)
@@ -1,4 +1,5 @@
-#   Copyright (C) 1999, 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
+#   Copyright (C) 1999, 2001, 2003, 2004, 2005, 2006
+#   Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -1055,7 +1056,54 @@ proc check_effective_target_lp64 { } {
     return $et_lp64_saved
 }
 
-# Return 1 if the target supports Decimal Floating Point, 0 otherwise.
+# Return 1 if the target supports compiling decimal floating point,
+# 0 otherwise.
+
+proc check_effective_target_dfp_nocache { } {
+    verbose "check_effective_target_dfp_nocache: compiling source" 2
+    set ret [string match "" [get_compiler_messages dfp object {
+        _Decimal32 x; _Decimal64 y; _Decimal128 z;
+    }]]
+    verbose "check_effective_target_dfp_nocache: returning $ret" 2
+    return $ret
+}
+
+proc check_effective_target_dfprt_nocache { } {
+    global tool
+
+    set ret 0
+
+    verbose "check_effective_target_dfprt_nocache: compiling source" 2
+    # Set up, compile, and execute a test program containing decimal
+    # float operations.
+    set src dfprt[pid].c
+    set exe dfprt[pid].x
+
+    set f [open $src "w"]
+    puts $f "_Decimal32 x = 1.2df; _Decimal64 y = 2.3dd; _Decimal128 z;"
+    puts $f "int main () { z = x + y; return 0; }"
+    close $f
+
+    verbose "check_effective_target_dfprt_nocache: compiling testfile $src" 2
+    set lines [${tool}_target_compile $src $exe executable ""]
+    file delete $src
+
+    if [string match "" $lines] then {
+       # No error message, compilation succeeded.
+       set result [${tool}_load "./$exe" "" ""]
+       set status [lindex $result 0]
+       remote_file build delete $exe
+       verbose "check_effective_target_dfprt_nocache: testfile status is <$status>" 2
+       if { $status == "pass" } then {
+           set ret 1
+       }
+    }
+    return $ret
+    verbose "check_effective_target_dfprt_nocache: returning $ret" 2
+}
+
+# Return 1 if the target supports compiling Decimal Floating Point,
+# 0 otherwise.
 #
 # This won't change for different subtargets so cache the result.
 
@@ -1065,15 +1113,30 @@ proc check_effective_target_dfp { } {
     if [info exists et_dfp_saved] {
        verbose "check_effective_target_dfp: using cached result" 2
     } else {
-       verbose "check_effective_target_dfp: compiling source" 2
-       set et_dfp_saved [string match "" [get_compiler_messages dfp object {
-           _Decimal32 x; _Decimal64 y; _Decimal128 z;
-       }]]
+       set et_dfp_saved [check_effective_target_dfp_nocache]
     }
     verbose "check_effective_target_dfp: returning $et_dfp_saved" 2
     return $et_dfp_saved
 }
 
+# Return 1 if the target supports linking and executing Decimal Floating
+# Point, # 0 otherwise.
+#
+# This won't change for different subtargets so cache the result.
+
+proc check_effective_target_dfprt { } {
+    global et_dfprt_saved
+    global tool
+
+    if [info exists et_dfprt_saved] {
+       verbose "check_effective_target_dfprt: using cached result" 2
+    } else {
+       set et_dfprt_saved [check_effective_target_dfprt_nocache]
+    }
+    verbose "check_effective_target_dfprt: returning $et_dfprt_saved" 2
+    return $et_dfprt_saved
+}
+
 # Return 1 if the target needs a command line argument to enable a SIMD
 # instruction set.
 #