OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [tm/] [noexcept-2.C] - Blame information for rev 749

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
// { dg-options "-fgnu-tm -std=c++0x" }
3
 
4
// All of these must fail, because they are not constant expressions.
5
template int foo(int x, T t)
6
{
7
  __transaction_atomic noexcept(t) { x++; }      /* { dg-error "not a constant" } */
8
  return __transaction_atomic noexcept(t) (x+1); /* { dg-error "not a constant" } */
9
}
10
 
11
int bar(int x)
12
{
13
  __transaction_atomic noexcept(x == 23) { x++; }      /* { dg-error "not a constant" } */
14
  return __transaction_atomic noexcept(x == 42) (x+1); /* { dg-error "not a constant" } */
15
}
16
 
17
int f(int x)
18
{
19
  return foo(x, true);
20
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.