public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "guido.hatzsis at yandex dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/66784] New: no symbol emitted for builtin with lto
Date: Tue, 07 Jul 2015 00:48:00 -0000 [thread overview]
Message-ID: <bug-66784-4@http.gcc.gnu.org/bugzilla/> (raw)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66784
Bug ID: 66784
Summary: no symbol emitted for builtin with lto
Product: gcc
Version: lto
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: guido.hatzsis at yandex dot com
Target Milestone: ---
No symbols are emitted when compiling a built-in with -flto.
eg:
# cat << __EOF > bar.i
_Complex float __mulsc3(float x, float y, float z, float a) { return -1.0; }
__EOF
# rm bar.o ; gcc -c bar.i ; gcc-nm bar.o
0000000000000000 T __mulsc3
# rm bar.o ; gcc -flto -c bar.i ; gcc-nm bar.o
/usr/lib/gcc/x86_64-pc-linux-gnu/5.1.0/../../../../x86_64-pc-linux-gnu/bin/nm:
bar.o: no symbols
# cat << __EOF > bar.i
void __mulsc3(float x, float y, float z, float a) { }
__EOF
# rm bar.o ; gcc -flto -c bar.i ; gcc-nm bar.o
bar.i:1:6: warning: conflicting types for built-in function ‘__mulsc3’
void __mulsc3(float x, float y, float z, float a) { }
^
00000000 T __mulsc3
>From gcc-bugs-return-491613-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jul 07 01:22:37 2015
Return-Path: <gcc-bugs-return-491613-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 105225 invoked by alias); 7 Jul 2015 01:22:37 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 105068 invoked by uid 48); 7 Jul 2015 01:22:29 -0000
From: "kkojima at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/66780] [4.9 Regression] Compiling with -fstack-protector-strong causes binary to segfault
Date: Tue, 07 Jul 2015 01:22:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 4.9.3
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: kkojima at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-66780-4-gARlUMFDbh@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66780-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66780-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-07/txt/msg00503.txt.bz2
Content-length: 982
https://gcc.gnu.org/bugzilla/show_bug.cgi?idf780
--- Comment #1 from Kazumoto Kojima <kkojima at gcc dot gnu.org> ---
I can reproduce the issue with the trunk cross compiler.
It seems that openproc function in proc/readproc.c is miscompiled
with -fstack-protector-strong. Here is a reduced test case:
--
int t;
struct s {};
int bar (void);
int baz (int, struct s *);
int
foo (int x)
{
struct s sbuf;
static int d;
int val = bar ();
if (d)
{
t = baz (x, &sbuf);
d = 1;
}
return val;
}
--
It turned out that the fix for PR65249 causes this problem.
The codes for stack protect can be inserted after some function
call returning a value. That return value in R0 register could
be clobbered with the fix for PR65249.
I thought that stack_chk_guard thingy is inserted at the head
of the function. It's not the case, unfortunately.
I think that the wrong code is worse than the ICE. I'd like
to revert the patches of PR65249 and reopen that PR.
next reply other threads:[~2015-07-07 0:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-07 0:48 guido.hatzsis at yandex dot com [this message]
2015-07-07 8:11 ` [Bug lto/66784] " rguenth at gcc dot gnu.org
2015-08-04 8:27 ` guido.hatzsis at yandex dot com
2021-12-24 8:20 ` pinskia 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-66784-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).