mirror of
https://github.com/cc65/cc65.git
synced 2025-01-26 17:36:57 +00:00
Add regression tests for duplicate globals with different linkage.
This commit is contained in:
parent
6c3873316b
commit
05d1b8072b
18
test/err/duplicate-global-static.c
Normal file
18
test/err/duplicate-global-static.c
Normal 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;
|
||||
}
|
18
test/err/duplicate-static-global.c
Normal file
18
test/err/duplicate-static-global.c
Normal 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;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user