(root)/
gcc-13.2.0/
gcc/
testsuite/
g++.dg/
ext/
builtin-line1.C
// __builtin_LINE gets the location where the default argument is expanded.
// { dg-do run }

#include <cassert>
struct Foo
{
  int line;
  Foo( int line = __builtin_LINE() )
    : line( line )
  {}
};

int main()
{
  assert (Foo().line == __LINE__);
  assert ((new Foo)->line == __LINE__);
}