Internal compiler error

support for the ARM toolchain
Post Reply
Dwedit
Posts: 43
Joined: Sun Jan 06, 2008 4:06 am

Internal compiler error

Post by Dwedit » Thu Jun 02, 2022 9:37 pm

This is a minimal C program that triggers an "internal compiler error" if built with the -Os switch.

I'm building it with the command "arm-none-eabi-gcc test.c -Os"

The code: (Save as "test.c")

Code: Select all

int main()
{
	{
		char *s=(char*)0x0203fc08;
		//advance past first null
		while (*s++ != 0);
		//advance past second null
		while (*s++ != 0);
	}
	return 0;
}
And I get this output:

Code: Select all

during GIMPLE pass: ivopts
test.c: In function 'main':
test.c:1:5: internal compiler error: in build2, at tree.cc:5003
    1 | int main()
      |     ^~~~
libbacktrace could not find executable to open
Please submit a full bug report, with preprocessed source (by using -freport-bug).
See <http://wiki.devkitpro.org/index.php/Bug_Reports> for instructions.
I also notice that if I instead declare the pointer as "volatile", the internal error disappears.

Also, the Wiki page for bug reports is currently not loading, it gives an SSL certificate error.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests