view gcc/testsuite/g++.dg/abi/empty20.C @ 131:84e7813d76e9

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

// PR c++/60336
// { dg-options "-Wabi=11 -O0" }

struct A { };

void f(A, A) { }	// No warning, trailing parms all empty
void f(A, A, int) { }	// { dg-warning "ABI" "" { target { { i?86-*-* x86_64-*-* } && { ! { ia32 } } } } }
__attribute__ ((always_inline))
inline void f(A a, int i) // No warning, always inlined
{
  f(a,a,i); // { dg-warning "ABI" "" { target { { i?86-*-* x86_64-*-* } && { ! { ia32 } } } } }
}
int main()
{
  A a;
  f(a,a);
  f(a,a,42); // { dg-warning "ABI" "" { target { { i?86-*-* x86_64-*-* } && { ! { ia32 } } } } }
  f(a,42);
}