added tests related to pr #1110

This commit is contained in:
mrdudz
2020-07-22 15:52:04 +02:00
parent ce06b20c6c
commit 98b2d43c2b
2 changed files with 34 additions and 0 deletions

19
test/val/pr1110a.c Normal file
View File

@@ -0,0 +1,19 @@
/* pr #1110 - the part of the redefinition that should compile */
static const unsigned char array[3]; /* OK */
static const unsigned char array[] = { 0, 1, 2 }; /* OK - complete definition*/
static const unsigned char array[3]; /* OK */
static const unsigned char array[]; /* OK */
#include <stdlib.h>
#include <stdio.h>
int main(void)
{
printf("%u %u %u\n", array[0], array[1], array[2]);
if ((array[0] != 0) || (array[1] != 1) || (array[2] != 2)) {
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}