<div dir="ltr">The program below crashes when compiled with -O2 or greater optimization on Ubuntu 20.04 (it worked fine on at least 1[468].04. I know that it's my own fault for forgetting a return value and ignoring the compiler warning, but IMHO, this shouldn't result in a difficult to debug segfault. Shame on me for writing code with undefined behavior. Shame on gcc for a punishment not suited to the crime. ;) I write this in the hope that somebody else doesn't waste hours debugging a problem with a program that has run fine through many versions of gcc with a previously benign missing but ignored return value.<div><br></div><div>int init()<br>{<br>}<br>int main(int argc, char *argv[])<br>{<br>  init();<br>  return 0;<br>}<br></div><div><br></div></div>