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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [decltype17.C] - Rev 707

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

// PR c++/36628
// { dg-options "-std=c++0x" }
// { dg-do run }

#include <typeinfo>
#include <string.h>

int  rvalue();
int& lvalueref();
int&& rvalueref();

decltype(true ? rvalue() : rvalue()) f()
{}

decltype(true ? lvalueref() : lvalueref()) g()
{}

decltype(true ? rvalueref() : rvalueref()) h()
{}

int main()
{
  if (strcmp (typeid(f).name(), "FivE") != 0)
    return 1;
  if (strcmp (typeid(g).name(), "FRivE") != 0)
    return 2;
  if (strcmp (typeid(h).name(), "FivE") != 0)
    return 3;
}

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

powered by: WebSVN 2.1.0

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