SHM - error input argument

Hello, I have a problem with homework 3 with pasting string argument from terminal to specific function. Accurately it is in main function in company file. When I call function "set_shm_company(char *company_name)" from the said main function it occurs this error: "/home/cermaj14/WindRiver/workspace/Monitor_app/company.c", line 71: internal error: assertion failed: Invalid C99 IL expression kind (./../src/eparse/lower_c99.c, line 3690) id_company = set_shm_company(d); Doesn`t matter if input parameter is argv[1] or some char d[] = "someString". I have found just one article at StackOverFlow and they mentioned it is compiler problem. Thanks for help Jan Čermák

Hello, On 11/06/2017 06:19 PM, cermaj14@fel.cvut.cz wrote:
Hello, I have a problem with homework 3 with pasting string argument from terminal to specific function. Accurately it is in main function in company file. When I call function "set_shm_company(char *company_name)" from the said main function it occurs this error:
"/home/cermaj14/WindRiver/workspace/Monitor_app/company.c", line 71: internal error: assertion failed: Invalid C99 IL expression kind (./../src/eparse/lower_c99.c, line 3690) id_company = set_shm_company(d);
Doesn`t matter if input parameter is argv[1] or some char d[] = "someString". I have found just one article at StackOverFlow and they mentioned it is compiler problem.
Please, check your code for copying of strings. It's not possible to copy by assignment (like `new_string = old_string`). Special function from `string.h` library is needed. Have a nice day, Jiri Hubacek

On Mon, Nov 06 2017, cermaj14@fel.cvut.cz wrote:
Hello, I have a problem with homework 3 with pasting string argument from terminal to specific function. Accurately it is in main function in company file. When I call function "set_shm_company(char *company_name)" from the said main function it occurs this error:
"/home/cermaj14/WindRiver/workspace/Monitor_app/company.c", line 71: internal error: assertion failed: Invalid C99 IL expression kind (./../src/eparse/lower_c99.c, line 3690) id_company = set_shm_company(d);
Yes, it looks like a compiler problem, probably triggered by something strange in your code. It is hard to guess what the problem could be, when we do not see your code. If you are not able to resolve the issue by changing your code, try changing the compiler. This can be easily done by changing "Active build spec" from SIMLINUXdiab to SIMLINUXgnu (or vice versa). Best regards, -Michal Sojka

Changing the compiler reveals the problem at my site in header file called function: set_shm_company(struct) instead of correct set_shm_company(char*). Thank you a lot Jan Čermák Cituji Michal Sojka <sojkam1@fel.cvut.cz>:
On Mon, Nov 06 2017, cermaj14@fel.cvut.cz wrote:
Hello, I have a problem with homework 3 with pasting string argument from terminal to specific function. Accurately it is in main function in company file. When I call function "set_shm_company(char *company_name)" from the said main function it occurs this error:
"/home/cermaj14/WindRiver/workspace/Monitor_app/company.c", line 71: internal error: assertion failed: Invalid C99 IL expression kind (./../src/eparse/lower_c99.c, line 3690) id_company = set_shm_company(d);
Yes, it looks like a compiler problem, probably triggered by something strange in your code. It is hard to guess what the problem could be, when we do not see your code. If you are not able to resolve the issue by changing your code, try changing the compiler. This can be easily done by changing "Active build spec" from SIMLINUXdiab to SIMLINUXgnu (or vice versa).
Best regards, -Michal Sojka
participants (3)
-
cermaj14@fel.cvut.cz
-
Jiri Hubacek
-
Michal Sojka