https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64187
--- Comment #2 from Brian <brian.corriveau at ericsson dot com> --- (In reply to Andrew Pinski from comment #1) > char *test = "this is a test"; > > > This is a string literal so it stored in constant memory and which is why > you are getting a segfault. I was thinking "test" would be on the stack, but obviously not. I did compile with the -Wall option before filing the bug, but I didn't get any complaints. Maybe this is something that could be improved. thanks for the speedy answer, brian