Patchwork [testsuite] : Add dg-error for unsupported floating suffix

login
register
mail settings
Submitter Uros Bizjak
Date Nov. 15, 2012, 12:35 a.m.
Message ID <CAFULd4Yk9LXGw4RY=CcjzkHK9fSoFuB7Gm7w51JbGMqAw09dsA@mail.gmail.com>
Download mbox | patch
Permalink /patch/199082/
State New
Headers show

Comments

Uros Bizjak - Nov. 15, 2012, 12:35 a.m.
Hello!

Attached patch fixes following testsuite failure

FAIL: g++.dg/cpp0x/gnu_fext-numeric-literals.C (test for excess errors)
FAIL: g++.dg/cpp0x/std_fext-numeric-literals.C (test for excess errors)

on targets that don't support Q and W floating suffixes.

2012-11-15  Uros Bizjak  <ubizjak@gmail.com>

	* g++.dg/cpp0x/gnu_fext-numeric-literals.C: Add dg-error directive
	for unsupported non-standard suffix on floating constant.
	* g++.dg/cpp0x/std_fext-numeric-literals.C: Ditto.

Tested on alphaev68-pc-linux-gnu and x86_64-pc-linux-gnu.

OK for mainline?

Uros.

Patch

Index: gnu_fext-numeric-literals.C
===================================================================
--- gnu_fext-numeric-literals.C	(revision 193513)
+++ gnu_fext-numeric-literals.C	(working copy)
@@ -91,10 +91,10 @@ 
   auto rfp = 1.0r; // { dg-error "fixed-point types not supported" }
   auto Rfp = 1.0R; // { dg-error "fixed-point types not supported" }
 
-  auto wfp = 1.0w;
-  auto Wfp = 1.0W;
-  auto qfp = 1.0q;
-  auto Qfp = 1.0Q;
+  auto wfp = 1.0w; // { dg-error "unsupported non-standard suffix on floating constant" "" { target { ! { ia64-*-* i?86-*-* x86_64-*-* } } } }
+  auto Wfp = 1.0W; // { dg-error "unsupported non-standard suffix on floating constant" "" { target { ! { ia64-*-* i?86-*-* x86_64-*-* } } } }
+  auto qfp = 1.0q; // { dg-error "unsupported non-standard suffix on floating constant" "" { target { ! { ia64-*-* i?86-*-* x86_64-*-* } } } }
+  auto Qfp = 1.0Q; // { dg-error "unsupported non-standard suffix on floating constant" "" { target { ! { ia64-*-* i?86-*-* x86_64-*-* } } } }
 }
 
 // { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 7 }
Index: std_fext-numeric-literals.C
===================================================================
--- std_fext-numeric-literals.C	(revision 193513)
+++ std_fext-numeric-literals.C	(working copy)
@@ -91,10 +91,10 @@ 
   auto rfp = 1.0r; // { dg-error "fixed-point types not supported" }
   auto Rfp = 1.0R; // { dg-error "fixed-point types not supported" }
 
-  auto wfp = 1.0w;
-  auto Wfp = 1.0W;
-  auto qfp = 1.0q;
-  auto Qfp = 1.0Q;
+  auto wfp = 1.0w; // { dg-error "unsupported non-standard suffix on floating constant" "" { target { ! { ia64-*-* i?86-*-* x86_64-*-* } } } }
+  auto Wfp = 1.0W; // { dg-error "unsupported non-standard suffix on floating constant" "" { target { ! { ia64-*-* i?86-*-* x86_64-*-* } } } }
+  auto qfp = 1.0q; // { dg-error "unsupported non-standard suffix on floating constant" "" { target { ! { ia64-*-* i?86-*-* x86_64-*-* } } } }
+  auto Qfp = 1.0Q; // { dg-error "unsupported non-standard suffix on floating constant" "" { target { ! { ia64-*-* i?86-*-* x86_64-*-* } } } }
 }
 
 // { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 7 }