struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug3037889.c
blobafabaf133886057a6a6b11b8fa9ea46631a7baa9
1 /*
2 bug3037889.c
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma disable_warning 88 //no warning about casting LITERAL value to 'generic' pointer
9 #endif
11 /* causes error 9: FATAL Compiler Internal Error in file 'SDCCicode.c' line number '2939' : code generator internal error
12 Contact Author with source code
13 Internal error: validateLink failed in DCL_TYPE(ptr) @ SDCCicode.c:2887: expected DECLARATOR, got SPECIFIER
14 And on ds390 this further on caused also:
15 Internal error: validateOpType failed in OP_SYMBOL(result) @ gen.c:11914: expected symbol, got value */
16 void Bug3037889 (void)
18 *((char *) 0x42e0 - 1) = 1; /* compiler crashes */
19 *((char *) 0x42e0 + 1) = 1; /* works fine */
20 *((char *) (0x42e0 - 1)) = 1; /* works fine */
23 /* Infinite loop should not be executed, caused:
24 Internal error: validateOpType failed in OP_SYMBOL(IC_RESULT (ic)) @ SDCCloop.c:1024: expected symbol, got value */
25 void Bug3034976 (void)
27 while (1)
29 *(unsigned char __data *)0 = 0;
33 /* caused error 9: FATAL Compiler Internal Error in file '/SDCCicode.c' line number '2865' : code generator internal error
34 Contact Author with source code
35 Internal error: validateLink failed in DCL_TYPE(ptr) @ SDCCicode.c:2813: expected DECLARATOR, got SPECIFIER */
36 void Bug3153956 (void)
38 ((char volatile __xdata *)0)[1] = 0;
42 * dummy test to be executed, to get rid of regression test warning:
43 * Empty function list in ../../../sdcc/support/regression/tests/bug3037889.c!
45 void testDummy (void)