From: borutr Date: Sun, 22 Apr 2007 16:12:39 +0000 (+0000) Subject: test-1699804.c renamed to bug-1699804.c X-Git-Url: https://git.gag.com/?a=commitdiff_plain;ds=sidebyside;h=bf6c49143babe93f1aef56607af11811804b2ec9;p=fw%2Fsdcc test-1699804.c renamed to bug-1699804.c git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4764 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index e1a32e3c..67eb9964 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,7 +6,7 @@ "For list of warnings and corresponding codes, see err_warn.txt" * src/SDCCsymt.c: fixed bug #1699804: Bug with some uses of sizeof(static local array) (MCS51) - * support/regression/tests/test-1699804.c: added + * support/regression/tests/bug-1699804.c: added 2007-04-20 Maarten Brock diff --git a/support/regression/tests/bug-1699804.c b/support/regression/tests/bug-1699804.c new file mode 100644 index 00000000..f11478bf --- /dev/null +++ b/support/regression/tests/bug-1699804.c @@ -0,0 +1,22 @@ +/* + bug-1699804.c +*/ + +#include + +static __code const char Str_global[] = "Hello1"; +char s1, s2; + +void testFoo(void) +{ + static __code const char str_local[] = "Hello2"; + + static char str1[sizeof(Str_global)]; + static char str2[sizeof(str_local)]; // causes error 20: Undefined identifier 'str_local' + + s1 = sizeof(Str_global); + s2 = sizeof(str_local); // no error and proper result when line causing error (above) is removed + + ASSERT(s1 == 7); + ASSERT(s2 == 7); +} diff --git a/support/regression/tests/test-1699804.c b/support/regression/tests/test-1699804.c deleted file mode 100644 index f11478bf..00000000 --- a/support/regression/tests/test-1699804.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - bug-1699804.c -*/ - -#include - -static __code const char Str_global[] = "Hello1"; -char s1, s2; - -void testFoo(void) -{ - static __code const char str_local[] = "Hello2"; - - static char str1[sizeof(Str_global)]; - static char str2[sizeof(str_local)]; // causes error 20: Undefined identifier 'str_local' - - s1 = sizeof(Str_global); - s2 = sizeof(str_local); // no error and proper result when line causing error (above) is removed - - ASSERT(s1 == 7); - ASSERT(s2 == 7); -}