view gcc/testsuite/g++.dg/gcov/pr84548.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children 1830386684a0
line wrap: on
line source

// PR gcov-profile/84548
// { dg-options "-fprofile-arcs -ftest-coverage" }
// { dg-do run { target native } }
// TODO: add support for groups to gcov.exp script

struct A { static int foo () { return 1; }; static int bar () {
  int x;
  return 2; } };

int main()
{
  int a = A::foo () + A::bar ();
  if (a != 3)
    return 1;

  return 0;
}

// { dg-final { run-gcov remove-gcda pr84548.C } }