Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/gomp/pr92504.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 // PR c++/92504 | |
2 // { dg-do compile { target c++11 } } | |
3 // { dg-additional-options "-O2" } | |
4 | |
5 namespace std { | |
6 typedef __SIZE_TYPE__ size_t; | |
7 typedef __PTRDIFF_TYPE__ ptrdiff_t; | |
8 } | |
9 | |
10 struct A { | |
11 A (); | |
12 A (const A &); | |
13 A & operator++ (); | |
14 bool operator != (const A &) const; | |
15 std::ptrdiff_t operator - (const A &); | |
16 A & operator += (std::size_t); | |
17 int a; | |
18 A & begin (); | |
19 A & end (); // { dg-message "declared here" } | |
20 }; | |
21 | |
22 void | |
23 bar () | |
24 { | |
25 A a; | |
26 #pragma omp for | |
27 for (auto b = a; b != a.end; ++b) // { dg-error "invalid use of non-static member function" } | |
28 ; | |
29 } |