Add regression tests for duplicate globals with different linkage.

This commit is contained in:
Piotr Fusik 2017-03-09 21:18:48 +01:00
parent 6c3873316b
commit 05d1b8072b
2 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,18 @@
/*
!!DESCRIPTION!! global duplicated with static variable
!!ORIGIN!! cc65 regression tests
!!LICENCE!! Public Domain
!!AUTHOR!! Piotr Fusik
*/
/*
see: https://github.com/cc65/cc65/issues/191
*/
int n = 0;
static int n = 0; /* should give an error */
int main(void)
{
return n;
}

View File

@ -0,0 +1,18 @@
/*
!!DESCRIPTION!! static duplicated with global variable
!!ORIGIN!! cc65 regression tests
!!LICENCE!! Public Domain
!!AUTHOR!! Piotr Fusik
*/
/*
see: https://github.com/cc65/cc65/issues/191
*/
static int n = 0;
int n = 0; /* should give an error */
int main(void)
{
return n;
}