]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/20_util/ratio/cons/cons_overflow_neg.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 20_util / ratio / cons / cons_overflow_neg.cc
index 03c2c1f582d5a66f1b1fd0ffef6c966ca904c3fc..f8269d7e761d3c8c935770242eebb7e6dcf4f8fa 100644 (file)
@@ -1,8 +1,7 @@
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
 // { dg-require-cstdint "" }
 
-// Copyright (C) 2008, 2009 Free Software Foundation
+// Copyright (C) 2008-2024 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
 void
 test01()
 {
-  std::ratio<INTMAX_MAX, INTMAX_MAX> r1;
-  std::ratio<-INTMAX_MAX, INTMAX_MAX> r2;
+  std::ratio<INTMAX_MAX, INTMAX_MAX> r1 __attribute__((unused));
+  std::ratio<-INTMAX_MAX, INTMAX_MAX> r2 __attribute__((unused));
 }
 
 void
 test02()
 {
-  std::ratio<INTMAX_MIN, 1> r1;
+  std::ratio<INTMAX_MIN, 1> r1 __attribute__((unused)); // { dg-error "required from here" }
 }
 
 void
 test03()
 {
-  std::ratio<1, INTMAX_MIN> r1;
+  std::ratio<1, INTMAX_MIN> r1 __attribute__((unused)); // { dg-error "required from here" }
 }
 
 void
 test04()
 {
-  std::ratio<1,0> r1;
+  std::ratio<1,0> r1 __attribute__((unused)); // { dg-error "required from here" }
 }
 
-// { dg-error "instantiated from here" "" { target *-*-* } 34 }
-// { dg-error "instantiated from here" "" { target *-*-* } 40 }
-// { dg-error "instantiated from here" "" { target *-*-* } 46 }
-// { dg-error "denominator cannot be zero" "" { target *-*-* } 153 }
-// { dg-error "out of range" "" { target *-*-* } 154 }
-// { dg-excess-errors "In instantiation of" }
+// { dg-error "denominator cannot be zero" "" { target *-*-* } 0 }
+// { dg-error "out of range" "" { target *-*-* } 0 }
+// { dg-error "overflow in constant expression" "" { target *-*-* } 0 }
+// { dg-prune-output "not a member" }