Add a test for PR66655
PR target/66655 * g++.dg/pr66655.C: New test. * g++.dg/pr66655_1.cc: Test support file. * g++.dg/pr66655.h: Test header file. From-SVN: r232133
This commit is contained in:
parent
f885fa898f
commit
c8e62a9df1
@ -1,3 +1,10 @@
|
||||
2016-01-07 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR target/66655
|
||||
* g++.dg/pr66655.C: New test.
|
||||
* g++.dg/pr66655_1.cc: Test support file.
|
||||
* g++.dg/pr66655.h: Test header file.
|
||||
|
||||
2016-01-07 Dominique d'Humieres <dominiq@lps.ens.fr>
|
||||
|
||||
PR fortran/66680
|
||||
|
25
gcc/testsuite/g++.dg/pr66655.C
Normal file
25
gcc/testsuite/g++.dg/pr66655.C
Normal file
@ -0,0 +1,25 @@
|
||||
/* { dg-do run } */
|
||||
/* { dg-additional-sources "pr66655_1.cc" } */
|
||||
|
||||
#include "pr66655.h"
|
||||
|
||||
extern "C" void abort (void);
|
||||
|
||||
#define COOKIE 0xabcd0123
|
||||
|
||||
int
|
||||
g (void)
|
||||
{
|
||||
return COOKIE;
|
||||
}
|
||||
|
||||
extern int f (void);
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
S::set(0);
|
||||
if (f () != COOKIE)
|
||||
abort ();
|
||||
return 0;
|
||||
}
|
5
gcc/testsuite/g++.dg/pr66655.h
Normal file
5
gcc/testsuite/g++.dg/pr66655.h
Normal file
@ -0,0 +1,5 @@
|
||||
struct S
|
||||
{
|
||||
static int i;
|
||||
static void set (int ii) { i = -ii; }
|
||||
};
|
14
gcc/testsuite/g++.dg/pr66655_1.cc
Normal file
14
gcc/testsuite/g++.dg/pr66655_1.cc
Normal file
@ -0,0 +1,14 @@
|
||||
#include "pr66655.h"
|
||||
|
||||
extern int g (void);
|
||||
|
||||
int S::i;
|
||||
|
||||
int
|
||||
f (void)
|
||||
{
|
||||
int ret = g ();
|
||||
|
||||
S::set (ret);
|
||||
return ret;
|
||||
}
|
Loading…
Reference in New Issue
Block a user