Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

array of structure #377

Closed
IngeniariusSoftware opened this issue Sep 10, 2022 · 0 comments · Fixed by #416
Closed

array of structure #377

IngeniariusSoftware opened this issue Sep 10, 2022 · 0 comments · Fixed by #416
Assignees
Labels
bug Something isn't working

Comments

@IngeniariusSoftware
Copy link
Member

remove the line if it fixed in the testcuite:
00154: TODO array of structure

the test:
https://github.com/c-testsuite/c-testsuite/blob/master/tests/single-exec/00154.c

#include <stdio.h>

struct fred
{
   int boris;
   int natasha;
};

int main()
{
   struct fred bloggs;

   bloggs.boris = 12;
   bloggs.natasha = 34;

   printf("%d\n", bloggs.boris);
   printf("%d\n", bloggs.natasha);

   struct fred jones[2];
   jones[0].boris = 12;
   jones[0].natasha = 34;
   jones[1].boris = 56;
   jones[1].natasha = 78;

   printf("%d\n", jones[0].boris);
   printf("%d\n", jones[0].natasha);
   printf("%d\n", jones[1].boris);
   printf("%d\n", jones[1].natasha);

   return 0;
}
@IngeniariusSoftware IngeniariusSoftware added the bug Something isn't working label Sep 10, 2022
@LeDron12 LeDron12 linked a pull request Sep 14, 2022 that will close this issue
YaRiabtsev added a commit that referenced this issue Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants