History

tccgen.c: Fix flex array members some more

Last fix didn't work for function f1int in the added testcase.

Michael Matz committed 10 years ago

Commit ceccd3e1 parent 7e0ad4f3 files · +31 −2Browse files

Showing the changes to tests/tests2 (2 of 3 files). Show all

Unified · Split

2 files
  1. tests/tests2/80_flexarray.c +25 −0
  2. tests/tests2/80_flexarray.expect +0 −0
tests/tests2/80_flexarray.c+25−0
@@ -0,0 +1,25 @@
1+#include <stdio.h>
2+struct wchar {
3+ char *data; char mem[];
4+};
5+struct wint {
6+ char *data; int mem[];
7+};
8+int f1char (void) {
9+ char s[9]="nonono";
10+ struct wchar q = {"bugs"};
11+ return !s[0];
12+}
13+int f1int (void) {
14+ char s[9]="nonono";
15+ struct wint q = {"bugs"};
16+ return !s[0];
17+}
18+int main (void) {
19+ char s[9]="nonono";
20+ static struct wchar q = {"bugs", {'c'}};
21+ //printf ("tcc has %s %s\n", s, q.data);
22+ if (f1char() || f1int())
23+ printf ("bla\n");
24+ return !s[0];
25+}
tests/tests2/80_flexarray.expect+0−0

Empty file added.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t