public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "lucier at math dot purdue.edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/100152] New: Possible 10.3 bad code generation regression from 10.2/9.3 on Mac OS 10.15.7 (Catalina)
Date: Tue, 20 Apr 2021 13:48:19 +0000	[thread overview]
Message-ID: <bug-100152-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 100152
           Summary: Possible 10.3 bad code generation regression from
                    10.2/9.3 on Mac OS 10.15.7 (Catalina)
           Product: gcc
           Version: 10.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: lucier at math dot purdue.edu
  Target Milestone: ---

With this compiler:

[Bradleys-Mac-mini:~] lucier% /usr/local/gcc-10.3.0/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/usr/local/gcc-10.3.0/bin/gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc-10.3.0/libexec/gcc/x86_64-apple-darwin19.6.0/10.3.0/lto-wrapper
Target: x86_64-apple-darwin19.6.0
Configured with: ../../gcc-10.3.0/configure --prefix=/usr/local/gcc-10.3.0
--enable-languages=c --disable-multilib --enable-checking=release
--with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.3.0 (GCC) 

and these compiler options:

/usr/local/gcc-10.3.0/bin/gcc -save-temps -g -O3 -Wno-unused -Wno-write-strings
-Wdisabled-optimization -fwrapv -fno-strict-aliasing -fno-trapping-math
-fno-math-errno -fschedule-insns2 -fomit-frame-pointer -fPIC -fno-common -mpc64
  -I"../include" -c -o c_intf.o -I. -DHAVE_CONFIG_H
-D___GAMBITDIR="\"/usr/local/Gambit\""
-D___GAMBITDIR_USERLIB="\"~/.gambit_userlib\""
-D___GAMBITDIR_INSTLIB="\"~~userlib\"" -D___SYS_TYPE_CPU="\"x86_64\""
-D___SYS_TYPE_VENDOR="\"apple\"" -D___SYS_TYPE_OS="\"darwin19.6.0\""
-D___CONFIGURE_COMMAND="\"./configure 'CC=/usr/local/gcc-10.3.0/bin/gcc
-save-temps -g' '--enable-single-host' '--enable-shared'"\"
-D___OBJ_EXTENSION="\".o\"" -D___EXE_EXTENSION="\"\"" -D___BAT_EXTENSION="\"\""
-D___PRIMAL c_intf.c -D___LIBRARY

on Mac OS 10.5.7 (Catalina), I get a runtime failure, with console message:

Exception Type:        EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes:       0x000000000000000c, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Illegal instruction: 4
Termination Reason:    Namespace SIGNAL, Code 0x4
Terminating Process:   exc handler [98080]

Application Specific Information:
dyld2 mode

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libgambit.dylib                     0x000000010dfaf010
___SCMOBJ_to_NONNULLSTRING + 1520 (c_intf.c:3280)

The disassembly (with arrow pointing to the noted instruction) is: 

(lldb) di -s 0x0000000103d60000 -c 10
libgambit.dylib`___SCMOBJ_to_NONNULLSTRING:
    0x103d60000 <+1504>: jl     0x103d60026               ; <+1542> at
c_intf.c:3282:9
    0x103d60002 <+1506>: orb    %al, 0x31(%rbp)
    0x103d60005 <+1509>: shlb   %cl, 0x2e(%rsi)
    0x103d60008 <+1512>: nopl   (%rax,%rax)
->  0x103d60010 <+1520>: movl   (%rbp,%r10,4), %esi
    0x103d60015 <+1525>: callq  0x103fba9a0               ; symbol stub for:
___UTF_8_put
    0x103d6001a <+1530>: movq   %r10, %rax
    0x103d6001d <+1533>: addq   $0x1, %r10
    0x103d60021 <+1537>: cmpq   %r12, %rax
    0x103d60024 <+1540>: jne    0x103d60010               ; <+1520> at
c_intf.c:3280:173

I'll add the .i and .s files.  I apologize for their length, I don't know how
much I can cut out and still keep them relevant.

             reply	other threads:[~2021-04-20 13:48 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-20 13:48 lucier at math dot purdue.edu [this message]
2021-04-20 13:48 ` [Bug target/100152] " lucier at math dot purdue.edu
2021-04-20 13:50 ` lucier at math dot purdue.edu
2021-04-20 14:33 ` iains at gcc dot gnu.org
2021-04-20 14:36 ` iains at gcc dot gnu.org
2021-04-20 14:40 ` lucier at math dot purdue.edu
2021-04-20 14:43 ` iains at gcc dot gnu.org
2021-04-20 14:58 ` lucier at math dot purdue.edu
2021-04-20 15:02 ` iains at gcc dot gnu.org
2021-04-20 15:09 ` lucier at math dot purdue.edu
2021-04-20 15:13 ` lucier at math dot purdue.edu
2021-04-20 15:17 ` iains at gcc dot gnu.org
2021-04-20 15:24 ` lucier at math dot purdue.edu
2021-04-20 17:22 ` lucier at math dot purdue.edu
2021-04-21  4:27 ` gabravier at gmail dot com
2021-04-21  8:52 ` iains at gcc dot gnu.org
2021-04-21 13:17 ` lucier at math dot purdue.edu
2021-04-21 15:32 ` iains at gcc dot gnu.org
2021-04-21 18:12 ` lucier at math dot purdue.edu
2021-04-21 18:18 ` iains at gcc dot gnu.org
2021-04-21 18:29 ` iains at gcc dot gnu.org
2021-04-21 20:00 ` iains at gcc dot gnu.org
2021-04-21 20:38 ` iains at gcc dot gnu.org
2021-04-21 23:24 ` lucier at math dot purdue.edu
2021-04-22 10:28 ` [Bug target/100152] [10.3, 11, 12 Regression] [Darwin, X86] used caller-saved register not preserved across a call iains at gcc dot gnu.org
2021-04-22 12:54 ` lucier at math dot purdue.edu
2021-04-22 14:35 ` feeley at iro dot umontreal.ca
2021-04-22 23:13 ` [Bug target/100152] [10.3, 11, 12 Regression] " iains at gcc dot gnu.org
2021-04-23  0:32 ` iains at gcc dot gnu.org
2021-04-23  6:51 ` iains at gcc dot gnu.org
2021-04-23  8:13 ` [Bug target/100152] [10/11/12 " rguenth at gcc dot gnu.org
2021-04-23  8:32 ` iains at gcc dot gnu.org
2021-04-23  8:48 ` iains at gcc dot gnu.org
2021-04-23  8:54 ` rguenth at gcc dot gnu.org
2021-04-23  8:58 ` rguenth at gcc dot gnu.org
2021-04-23  9:05 ` rguenth at gcc dot gnu.org
2021-04-23  9:09 ` iains at gcc dot gnu.org
2021-04-23 11:02 ` rguenth at gcc dot gnu.org
2021-04-23 12:34 ` iains at gcc dot gnu.org
2021-04-23 12:57 ` rguenth at gcc dot gnu.org
2021-04-23 12:58 ` rguenth at gcc dot gnu.org
2021-04-23 13:13 ` iains at gcc dot gnu.org
2021-04-24 12:41 ` iains at gcc dot gnu.org
2021-04-24 12:45 ` cvs-commit at gcc dot gnu.org
2021-04-24 18:45 ` iains at gcc dot gnu.org
2021-05-02 15:36 ` iains at gcc dot gnu.org
2021-05-03  7:54 ` iains at gcc dot gnu.org
2021-05-09  1:57 ` lucier at math dot purdue.edu
2021-05-09  7:25 ` iains at gcc dot gnu.org
2021-05-09 15:43 ` lucier at math dot purdue.edu
2021-05-09 19:22 ` iains at gcc dot gnu.org
2021-05-09 20:00 ` lucier at math dot purdue.edu
2021-05-09 22:36 ` iains at gcc dot gnu.org
2021-05-11  7:48 ` iains at gcc dot gnu.org
2021-05-13  3:35 ` lucier at math dot purdue.edu
2021-05-14 14:04 ` jakub at gcc dot gnu.org
2021-07-09 16:42 ` cvs-commit at gcc dot gnu.org
2021-07-20  6:52 ` cvs-commit at gcc dot gnu.org
2021-07-20  7:00 ` [Bug target/100152] [10 " iains at gcc dot gnu.org
2021-07-22 15:21 ` lucier at math dot purdue.edu
2022-05-29 19:13 ` cvs-commit at gcc dot gnu.org
2022-05-29 19:25 ` iains at gcc dot gnu.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-100152-4@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: 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).