public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/32770] New: -fdefault-integer-8 and the library Date: Sun, 15 Jul 2007 09:26:00 -0000 [thread overview] Message-ID: <bug-32770-10391@http.gcc.gnu.org/bugzilla/> (raw) -fdefault-integer-8 has some "interesting" interactions with the library, especially on big-endian systems. Look at the following program: $ cat maxloc-mask.f90 program main real, dimension(2) :: a call random_number(a) print *,maxloc(a,mask=.true.) end program main $ gfortran -fdump-tree-original -fdefault-integer-8 -fdefault-real-8 maxloc-mask.f90 This produces { int8 A.4[1]; struct array1_int8 atmp.3; static logical8 C.1015 = 1; struct array1_real8 parm.2; parm.2.dtype = 537; parm.2.dim[0].lbound = 1; parm.2.dim[0].ubound = 2; parm.2.dim[0].stride = 1; parm.2.data = (void *) &a[0]; parm.2.offset = -1; atmp.3.dtype = 521; atmp.3.dim[0].stride = 1; atmp.3.dim[0].lbound = 0; atmp.3.dim[0].ubound = 0; atmp.3.data = (void *) &A.4; atmp.3.offset = 0; _gfortran_smaxloc0_8_r8 (&atmp.3, &parm.2, &C.1015); and the function called is extern void smaxloc0_8_r8 (gfc_array_i8 * const restrict, gfc_array_r8 * const restrict, GFC_LOGICAL_4 *); Works on little-endian systems, won't work on big-endian systems. Intrinsics this probably causes problems on: maxloc, maxval, minloc, minval. There may be other places like this. I don't have a big-endian system, so I can't test this. I'd appreciate a confirmation. -- Summary: -fdefault-integer-8 and the library Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: libfortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tkoenig at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32770
next reply other threads:[~2007-07-15 9:26 UTC|newest] Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-07-15 9:26 tkoenig at gcc dot gnu dot org [this message] 2007-07-28 12:42 ` [Bug libfortran/32770] " fxcoudert at gcc dot gnu dot org 2007-07-28 13:27 ` dominiq at lps dot ens dot fr 2007-07-28 13:37 ` fxcoudert at gcc dot gnu dot org 2007-07-28 14:18 ` dominiq at lps dot ens dot fr 2007-07-29 8:01 ` dominiq at lps dot ens dot fr 2007-07-29 8:10 ` fxcoudert at gcc dot gnu dot org 2007-07-29 8:59 ` dominiq at lps dot ens dot fr 2007-07-29 9:24 ` dominiq at lps dot ens dot fr 2007-07-29 9:47 ` fxcoudert at gcc dot gnu dot org 2007-07-29 11:08 ` dominiq at lps dot ens dot fr 2007-07-29 11:09 ` dominiq at lps dot ens dot fr 2007-07-29 11:11 ` dominiq at lps dot ens dot fr 2007-07-29 11:19 ` fxcoudert at gcc dot gnu dot org 2007-07-29 11:44 ` dominiq at lps dot ens dot fr 2007-07-29 12:21 ` dominiq at lps dot ens dot fr 2007-07-29 12:33 ` dominiq at lps dot ens dot fr 2007-07-29 12:44 ` fxcoudert at gcc dot gnu dot org 2007-07-29 12:59 ` dominiq at lps dot ens dot fr 2007-07-29 13:11 ` fxcoudert at gcc dot gnu dot org 2007-07-29 13:26 ` dominiq at lps dot ens dot fr 2007-07-29 14:57 ` [Bug libfortran/32770] [Meta-bug] -fdefault-integer-8 issues tkoenig at gcc dot gnu dot org 2007-07-30 21:07 ` tkoenig at gcc dot gnu dot org 2007-08-02 16:03 ` dominiq at lps dot ens dot fr 2007-08-02 20:08 ` tkoenig at gcc dot gnu dot org 2007-08-02 20:19 ` tkoenig at gcc dot gnu dot org 2007-08-03 5:53 ` tkoenig at gcc dot gnu dot org 2007-08-04 18:21 ` tkoenig at gcc dot gnu dot org 2007-08-04 20:14 ` tkoenig at gcc dot gnu dot org 2007-11-05 17:15 ` fxcoudert at gcc dot gnu dot org 2007-11-08 14:09 ` fxcoudert at gcc dot gnu dot org 2007-11-18 21:18 ` tkoenig at gcc dot gnu dot org 2007-11-20 21:57 ` tkoenig at gcc dot gnu dot org 2008-05-04 20:57 ` tkoenig at gcc dot gnu dot org 2008-12-22 0:02 ` tkoenig at gcc dot gnu dot org
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=bug-32770-10391@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /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: linkBe 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).