Re: [r16-4474 Regression] FAIL: gfortran.dg/coarray_atomic_5.f90 -O scan-tree-dump-times original "value.. = 0;" 1 on Linux/x86_64

Andre Vehreschild via Gcc-regression <[email protected]>
Newsgroups gmane.comp.gcc.regression,gmane.comp.gcc.patches,gmane.comp.gcc.fortran
Message-ID <20251021081507.21928454@vepi2>
Hi,

taking the address of a constant like in &0 is usually a bad idea. Therefore in
this location it makes sense to have &value. Please do not modify the testcase,
but fix the code generation!

Regards,
	Andre

On Tue, 21 Oct 2025 12:54:15 +0800
Ma Yuao <[email protected]> wrote:

> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div
> dir="auto"><div dir="auto">Hi,</div><div dir="auto"><br></div><div
> dir="auto">Sorry for the regression. Looks like after the patch, the value
> gets folded to zero. Like following:</div><div dir="auto"><br></div><div
> dir="auto">_gfortran_caf_atomic_define \\(caf_token.., 0, 1, &amp;0, 0B, 1,
> 4\\);</div><div><br><div class="gmail_extra" dir="auto">If it is intended
> behavior, I will update the testcase tonight.</div><div class="gmail_extra"
> dir="auto"><br></div><div class="gmail_extra" dir="auto">Yuao</div><div
> class="gmail_extra"><br><div class="gmail_quote">2025年10月21日
> 10:23,&quot;Jiang, Haochen&quot; &lt;[email protected]&gt;写道:<br
> type="attribution"><blockquote class="quote" style="margin:0 0 0
> .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">On
> Linux/x86_64, <br>
> 
> <br>
> 2c1949bf152f8fcadb0ef7a44113c41d18724691 is the first bad commit
> <br>
> commit 2c1949bf152f8fcadb0ef7a44113c41d18724691
> <br>
> Author: Yuao Ma &lt;[email protected]&gt;
> <br>
> Date:&nbsp;&nbsp; Thu Oct 16 22:32:52 2025 +0800
> <br>
> 
> <br>
> &nbsp;&nbsp;&nbsp; fortran: allow character in conditional expression
> <br>
> 
> <br>
> caused
> <br>
> 
> <br>
> FAIL: gfortran.dg/coarray_atomic_5.f90&nbsp;&nbsp; -O&nbsp;&nbsp;
> scan-tree-dump-times original &quot;_gfortran_caf_atomic_define
> \\(caf_token.., 0, 1, &amp;value.., 0B, 1, 4\\);&quot; 1 <br> FAIL:
> gfortran.dg/coarray_atomic_5.f90&nbsp;&nbsp; -O&nbsp;&nbsp;
> scan-tree-dump-times original &quot;value.. = 0;&quot; 1 <br>
> 
> <br>
> with GCC configured with
> <br>
> 
> <br>
> ../../gcc/configure
> --prefix=/export/users3/haochenj/src/gcc-bisect/master/master/r16-4474/usr
> --enable-clocale=gnu --with-system-zlib --with-demangler-in-ld
> --with-fpmath=sse --enable-languages=c,c++,fortran --enable-cet --without-isl
> --enable-libmpx x86_64-linux --disable-bootstrap <br>
> 
> <br>
> To reproduce:
> <br>
> 
> <br>
> $ cd {build_dir}/gcc &amp;&amp; make check
> RUNTESTFLAGS=&quot;dg.exp=gfortran.dg/coarray_atomic_5.f90
> --target_board='unix{-m32}'&quot; <br> $ cd {build_dir}/gcc &amp;&amp; make
> check RUNTESTFLAGS=&quot;dg.exp=gfortran.dg/coarray_atomic_5.f90
> --target_board='unix{-m32\ -march=cascadelake}'&quot; <br> $ cd
> {build_dir}/gcc &amp;&amp; make check
> RUNTESTFLAGS=&quot;dg.exp=gfortran.dg/coarray_atomic_5.f90
> --target_board='unix{-m64}'&quot; <br> $ cd {build_dir}/gcc &amp;&amp; make
> check RUNTESTFLAGS=&quot;dg.exp=gfortran.dg/coarray_atomic_5.f90
> --target_board='unix{-m64\ -march=cascadelake}'&quot; <br>
> 
> <br>
> (Please directly reply to this email for question about this report.)
> <br>
> (If you met problems with cascadelake related, disabling AVX512F in command
> line might save that.) <br>
> (However, please make sure that there is no potential problems with AVX512.)
> <br>
> </p>
> </blockquote></div><br></div></div></div>

-- 
Andre Vehreschild * Email: vehre ad gmx dot de
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.