https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116409

--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to David Binderman from comment #10)
> This C code seems to fail with -O1:
> 
> int RB_Open_SingleDocumentation_document;
> char RB_Open_SingleDocumentation_document_0,
>     RB_Open_SingleDocumentation_default_name;
> char *RB_Open_SingleDocumentation_name;
> void *calloc();
> unsigned long strlen();
> void RB_Open_SingleDocumentation() {
>   long size = 0;
>   if (RB_Open_SingleDocumentation_document)
>     size += strlen(&RB_Open_SingleDocumentation_document_0);
>   else
>     size += strlen(&RB_Open_SingleDocumentation_default_name);
>   RB_Open_SingleDocumentation_name = calloc(size);
> }
> 

That is the same testcase as comment #8.

Reply via email to