public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jorge D'Elia <jdelia@intec.unl.edu.ar>
To: Paul Richard Thomas <paul.richard.thomas@gmail.com>
Cc: Jerry <jvdelisle2@gmail.com>, Gfortran List <fortran@gcc.gnu.org>
Subject: Re: beta gfortran 14.x.y (using -march=native and intrinsic repeat) gives a signal SIGILL
Date: Sat, 12 Aug 2023 10:41:10 -0300 (ART)	[thread overview]
Message-ID: <1762418863.818.1691847670663.JavaMail.zimbra@intec.unl.edu.ar> (raw)
In-Reply-To: <CAGkQGiL=BHKnna2vf4qxWpTQuhruXDd1OvdCmY8-8=JhmkiDOw@mail.gmail.com>

Hi Paul,

----- Mensaje original -----
> De: "Paul Richard Thomas" <paul.richard.thomas@gmail.com>
> Para: "Jerry" <jvdelisle2@gmail.com>
> CC: "Jorge D'Elia" <jdelia@cimec.unl.edu.ar>, "Gfortran List" <fortran@gcc.gnu.org>, "Jorge D'Elia"
> <jdelia@intec.unl.edu.ar>
> Enviado: Sábado, 12 de Agosto 2023 3:56:44
> Asunto: Re: beta gfortran 14.x.y (using -march=native and intrinsic repeat) gives a signal SIGILL
>
> Hi Jorge,
> 
>> There were some recent patches in this area IIRC.
>>
>> Jerry
> 
> The tree dump is identical to mine, obtained with GNU Fortran (GCC)
> 14.0.0 20230809 (experimental), so I doubt that any recent patches are
> responsible.

It seems so. Furthermore, I have the feeling that the problem is outside 
GFortran, between the use of -mtune=native versus -march=native. For example,

$ gfortran --version
GNU Fortran (GCC) 14.0.0 20230808 (experimental)

$ ls -all
total 4
drwxr-xr-x. 1 jdelia jdelia   16 Aug 12 10:06 .
drwxr-xr-x. 1 jdelia jdelia 2782 Aug 12 10:05 ..
-rwxr-xr-x. 1 jdelia jdelia  223 Aug 11 08:28 test.f90

$ gfortran -mtune=native -fcheck=all -std=f2018 -Wall -Werror -Wextra -g -fdump-tree-original -o test-mtune.exe test.f90
$ ls -all
total 36
drwxr-xr-x. 1 jdelia jdelia   110 Aug 12 10:17 .
drwxr-xr-x. 1 jdelia jdelia  2782 Aug 12 10:05 ..
-rwxr-xr-x. 1 jdelia jdelia   223 Aug 11 08:28 test.f90
-rwxr-xr-x. 1 jdelia jdelia 26856 Aug 12 10:17 test-mtune.exe
-rw-r--r--. 1 jdelia jdelia  1405 Aug 12 10:17 test-mtune-test.f90.005t.original

$ mv test-mtune-test.f90.005t.original test-mtune.f90.005t.original

$ ls -all
total 36
drwxr-xr-x. 1 jdelia jdelia   100 Aug 12 10:19 .
drwxr-xr-x. 1 jdelia jdelia  2782 Aug 12 10:05 ..
-rwxr-xr-x. 1 jdelia jdelia   223 Aug 11 08:28 test.f90
-rwxr-xr-x. 1 jdelia jdelia 26856 Aug 12 10:17 test-mtune.exe
-rw-r--r--. 1 jdelia jdelia  1405 Aug 12 10:17 test-mtune.f90.005t.original

$ gfortran -march=native -fcheck=all -std=f2018 -Wall -Werror -Wextra -g -fdump-tree-original -o test-march.exe test.f90
$ ls -all
total 68
drwxr-xr-x. 1 jdelia jdelia   194 Aug 12 10:19 .
drwxr-xr-x. 1 jdelia jdelia  2782 Aug 12 10:05 ..
-rwxr-xr-x. 1 jdelia jdelia   223 Aug 11 08:28 test.f90
-rwxr-xr-x. 1 jdelia jdelia 28064 Aug 12 10:19 test-march.exe
-rw-r--r--. 1 jdelia jdelia  1405 Aug 12 10:19 test-march-test.f90.005t.original
-rwxr-xr-x. 1 jdelia jdelia 26856 Aug 12 10:17 test-mtune.exe
-rw-r--r--. 1 jdelia jdelia  1405 Aug 12 10:17 test-mtune.f90.005t.original

$ mv test-march-test.f90.005t.original test-march.f90.005t.original

$ ls -all
total 68
drwxr-xr-x. 1 jdelia jdelia   184 Aug 12 10:19 .
drwxr-xr-x. 1 jdelia jdelia  2782 Aug 12 10:05 ..
-rwxr-xr-x. 1 jdelia jdelia   223 Aug 11 08:28 test.f90
-rwxr-xr-x. 1 jdelia jdelia 28064 Aug 12 10:19 test-march.exe
-rw-r--r--. 1 jdelia jdelia  1405 Aug 12 10:19 test-march.f90.005t.original
-rwxr-xr-x. 1 jdelia jdelia 26856 Aug 12 10:17 test-mtune.exe
-rw-r--r--. 1 jdelia jdelia  1405 Aug 12 10:17 test-mtune.f90.005t.original

$ diff test-mtune.f90.005t.original test-march.f90.005t.original 
# (nothing is shown, thus both tree dumps ares identical).

$ test-mtune.exe 
  cc :                                 

$ test-march.exe 

Program received signal SIGILL: Illegal instruction.

Backtrace for this error:
#0  0x15268845fb1f in ???
#1  0x4011c2 in test
	at /home/jdelia/TEST/test.f90:6
#2  0x4012ae in main
	at /home/jdelia/TEST/test.f90:8
Illegal instruction (core dumped)

> Being unable to reproduce the error, there is not much that I can do.
> Sorry

Non problem. To avoid this error, for now we exclude the use 
of -march=native in our makefiles, and just use -mtune=native.

> Paul

Thanks for your time.

Regards.
Jorge.
--

  reply	other threads:[~2023-08-12 13:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-11 12:34 Jorge D'Elia
2023-08-11 16:21 ` Jerry D
2023-08-11 16:55   ` Paul Richard Thomas
2023-08-11 17:42     ` Jorge D'Elia
2023-08-12  6:56   ` Paul Richard Thomas
2023-08-12 13:41     ` Jorge D'Elia [this message]
2023-08-12 16:05       ` Steve Kargl
2023-08-12 17:21       ` Jerry D

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1762418863.818.1691847670663.JavaMail.zimbra@intec.unl.edu.ar \
    --to=jdelia@intec.unl.edu.ar \
    --cc=fortran@gcc.gnu.org \
    --cc=jdelia@cimec.unl.edu.ar \
    --cc=jvdelisle2@gmail.com \
    --cc=paul.richard.thomas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).