public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/60563] New: FAIL: g++.dg/ext/sync-4.C on *-apple-darwin*
@ 2014-03-18 10:18 dominiq at lps dot ens.fr
2014-03-18 22:31 ` [Bug target/60563] " dominiq at lps dot ens.fr
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-03-18 10:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60563
Bug ID: 60563
Summary: FAIL: g++.dg/ext/sync-4.C on *-apple-darwin*
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: dominiq at lps dot ens.fr
CC: iains at gcc dot gnu.org, ian at gcc dot gnu.org
Host: *-apple-darwin*
Target: *-apple-darwin*
Build: *-apple-darwin*
Running target unix/-m32
FAIL: g++.dg/ext/sync-4.C -std=gnu++98 execution test
FAIL: g++.dg/ext/sync-4.C -std=gnu++11 execution test
FAIL: g++.dg/ext/sync-4.C -std=gnu++1y execution test
Running target unix/-m64
FAIL: g++.dg/ext/sync-4.C -std=gnu++98 (test for excess errors)
UNRESOLVED: g++.dg/ext/sync-4.C -std=gnu++98 compilation failed to produce
executable
FAIL: g++.dg/ext/sync-4.C -std=gnu++11 (test for excess errors)
UNRESOLVED: g++.dg/ext/sync-4.C -std=gnu++11 compilation failed to produce
executable
FAIL: g++.dg/ext/sync-4.C -std=gnu++1y (test for excess errors)
UNRESOLVED: g++.dg/ext/sync-4.C -std=gnu++1y compilation failed to produce
executable
There is no failure at r204199, but I see them at r204372. Since the test has
been introduced in r204360, it is likely that it has never worked on darwin.
For -m32 the run time failure is
terminate called after throwing an instance of 'int'
For -m64 the compilation aborts on
/opt/gcc/work/gcc/testsuite/g++.dg/ext/sync-4.C:12:47: error: conflicting
declaration 'typedef long int int64_t'
In file included from /opt/gcc/build_w/gcc/include-fixed/stdint.h:30:0,
from /opt/gcc/build_w/gcc/include/stdint.h:9,
from /usr/include/sys/resource.h:72,
from /usr/include/sys/wait.h:110,
from /usr/include/stdlib.h:65,
from /opt/gcc/work/gcc/testsuite/g++.dg/ext/sync-4.C:8:
/usr/include/sys/_types/_int64_t.h:30:20: note: previous declaration as
'typedef long long int int64_t'
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/60563] FAIL: g++.dg/ext/sync-4.C on *-apple-darwin*
2014-03-18 10:18 [Bug target/60563] New: FAIL: g++.dg/ext/sync-4.C on *-apple-darwin* dominiq at lps dot ens.fr
@ 2014-03-18 22:31 ` dominiq at lps dot ens.fr
2014-03-19 3:39 ` ian at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-03-18 22:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60563
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
If I replace everywhere int64 with int_64, the test compiles with -m64 and the
failing tests are
t3();
t4();
t5();
t6();
t9();
t10();
t11();
t12();
t16();
only with -m64, and
t17();
t18();
t19();
for both -m32 and -m64.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/60563] FAIL: g++.dg/ext/sync-4.C on *-apple-darwin*
2014-03-18 10:18 [Bug target/60563] New: FAIL: g++.dg/ext/sync-4.C on *-apple-darwin* dominiq at lps dot ens.fr
2014-03-18 22:31 ` [Bug target/60563] " dominiq at lps dot ens.fr
@ 2014-03-19 3:39 ` ian at gcc dot gnu.org
2014-03-19 3:44 ` ian at airs dot com
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: ian at gcc dot gnu.org @ 2014-03-19 3:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60563
--- Comment #2 from ian at gcc dot gnu.org <ian at gcc dot gnu.org> ---
Author: ian
Date: Wed Mar 19 03:38:21 2014
New Revision: 208674
URL: http://gcc.gnu.org/viewcvs?rev=208674&root=gcc&view=rev
Log:
PR target/60563
* g++.dg/ext/sync-4.C (int32_t): Remove typedef.
(ditype): Rename typedef from int64_t.
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/ext/sync-4.C
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/60563] FAIL: g++.dg/ext/sync-4.C on *-apple-darwin*
2014-03-18 10:18 [Bug target/60563] New: FAIL: g++.dg/ext/sync-4.C on *-apple-darwin* dominiq at lps dot ens.fr
2014-03-18 22:31 ` [Bug target/60563] " dominiq at lps dot ens.fr
2014-03-19 3:39 ` ian at gcc dot gnu.org
@ 2014-03-19 3:44 ` ian at airs dot com
2014-03-20 11:29 ` iains at gcc dot gnu.org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: ian at airs dot com @ 2014-03-19 3:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60563
Ian Lance Taylor <ian at airs dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ian at airs dot com
--- Comment #3 from Ian Lance Taylor <ian at airs dot com> ---
I patched the test to avoid using int64_t.
The test is intended to ensure that the builtin sync functions correctly throw
exceptions when compiling with -fnon-call-exceptions. The failure here may
indicate either that that does not work on Darwin, or that GCC can not unwind
from a segmentation violation on Darwin. I don't know which.
I marked the test to run on Darwin because cleanup-9.C runs on Darwin, and it
tests that GCC can unwind from a segmentation violation. If cleanup-9.C passes
on your system, then I don't know why sync-4.C fails. Somebody will have to
debug the issue.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/60563] FAIL: g++.dg/ext/sync-4.C on *-apple-darwin*
2014-03-18 10:18 [Bug target/60563] New: FAIL: g++.dg/ext/sync-4.C on *-apple-darwin* dominiq at lps dot ens.fr
` (2 preceding siblings ...)
2014-03-19 3:44 ` ian at airs dot com
@ 2014-03-20 11:29 ` iains at gcc dot gnu.org
2014-03-20 14:31 ` dominiq at lps dot ens.fr
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: iains at gcc dot gnu.org @ 2014-03-20 11:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60563
Iain Sandoe <iains at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-03-20
Ever confirmed|0 |1
--- Comment #4 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Ian Lance Taylor from comment #3)
> I patched the test to avoid using int64_t.
thanks Ian.
> The test is intended to ensure that the builtin sync functions correctly
> throw exceptions when compiling with -fnon-call-exceptions. The failure
> here may indicate either that that does not work on Darwin, or that GCC can
> not unwind from a segmentation violation on Darwin. I don't know which.
>
> I marked the test to run on Darwin because cleanup-9.C runs on Darwin, and
> it tests that GCC can unwind from a segmentation violation. If cleanup-9.C
> passes on your system, then I don't know why sync-4.C fails. Somebody will
> have to debug the issue.
Well - when I build the test -O0,O1,Os it passes. Will need to investigate
what's changing at O2.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/60563] FAIL: g++.dg/ext/sync-4.C on *-apple-darwin*
2014-03-18 10:18 [Bug target/60563] New: FAIL: g++.dg/ext/sync-4.C on *-apple-darwin* dominiq at lps dot ens.fr
` (3 preceding siblings ...)
2014-03-20 11:29 ` iains at gcc dot gnu.org
@ 2014-03-20 14:31 ` dominiq at lps dot ens.fr
2014-03-20 14:32 ` dominiq at lps dot ens.fr
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-03-20 14:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60563
--- Comment #5 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Created attachment 32405
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32405&action=edit
preprocessed file
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/60563] FAIL: g++.dg/ext/sync-4.C on *-apple-darwin*
2014-03-18 10:18 [Bug target/60563] New: FAIL: g++.dg/ext/sync-4.C on *-apple-darwin* dominiq at lps dot ens.fr
` (4 preceding siblings ...)
2014-03-20 14:31 ` dominiq at lps dot ens.fr
@ 2014-03-20 14:32 ` dominiq at lps dot ens.fr
2014-03-20 14:33 ` dominiq at lps dot ens.fr
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-03-20 14:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60563
--- Comment #6 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Created attachment 32406
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32406&action=edit
asm compiled with -std=gnu++11 -fexceptions -fnon-call-exceptions -save-temps
-fverbose-asm -dA
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/60563] FAIL: g++.dg/ext/sync-4.C on *-apple-darwin*
2014-03-18 10:18 [Bug target/60563] New: FAIL: g++.dg/ext/sync-4.C on *-apple-darwin* dominiq at lps dot ens.fr
` (5 preceding siblings ...)
2014-03-20 14:32 ` dominiq at lps dot ens.fr
@ 2014-03-20 14:33 ` dominiq at lps dot ens.fr
2014-03-20 14:34 ` dominiq at lps dot ens.fr
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-03-20 14:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60563
--- Comment #7 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Created attachment 32407
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32407&action=edit
asm compiled with -std=gnu++11 -fexceptions -fnon-call-exceptions -save-temps
-fverbose-asm -dA -O1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/60563] FAIL: g++.dg/ext/sync-4.C on *-apple-darwin*
2014-03-18 10:18 [Bug target/60563] New: FAIL: g++.dg/ext/sync-4.C on *-apple-darwin* dominiq at lps dot ens.fr
` (6 preceding siblings ...)
2014-03-20 14:33 ` dominiq at lps dot ens.fr
@ 2014-03-20 14:34 ` dominiq at lps dot ens.fr
2014-03-20 21:29 ` iains at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-03-20 14:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60563
--- Comment #8 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> Well - when I build the test -O0,O1,Os it passes.
Confirmed when running the test suite. However the following reduced test
/* { dg-do run { target hppa*-*-hpux* *-*-linux* *-*-gnu* powerpc*-*-darwin*
*-*-darwin[912]* } } */
/* { dg-require-effective-target sync_long_long_runtime } */
/* { dg-options "-fexceptions -fnon-call-exceptions -O2" } */
/* Verify that the builtin functions are correctly marked as trapping
when using -fnon-call-exceptions. */
#include <stdlib.h>
#include <signal.h>
typedef int ditype __attribute__ ((mode (DI)));
#define FN(IDX, RET, CALL) \
static RET f ## IDX (void *p) __attribute__ ((noinline)); \
static RET \
f ## IDX (void *p) \
{ \
return CALL; \
} \
static void \
t ## IDX () \
{ \
try \
{ \
f ## IDX(0); \
} \
catch (...) \
{ \
return; \
} \
abort(); \
}
FN(18, void, (__atomic_clear((ditype*)p, __ATOMIC_SEQ_CST)))
static void
handler(int)
{
sigset_t clear;
sigfillset (&clear);
sigprocmask (SIG_UNBLOCK, &clear, NULL);
throw 0;
}
int
main ()
{
signal (SIGSEGV, handler);
signal (SIGBUS, handler);
t18();
exit(0);
}
fails with -O1, but not with -O0 (-m32 and -m64).
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/60563] FAIL: g++.dg/ext/sync-4.C on *-apple-darwin*
2014-03-18 10:18 [Bug target/60563] New: FAIL: g++.dg/ext/sync-4.C on *-apple-darwin* dominiq at lps dot ens.fr
` (7 preceding siblings ...)
2014-03-20 14:34 ` dominiq at lps dot ens.fr
@ 2014-03-20 21:29 ` iains at gcc dot gnu.org
2014-12-19 0:18 ` howarth at bromo dot med.uc.edu
2015-02-11 22:04 ` howarth at bromo dot med.uc.edu
10 siblings, 0 replies; 12+ messages in thread
From: iains at gcc dot gnu.org @ 2014-03-20 21:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60563
--- Comment #9 from Iain Sandoe <iains at gcc dot gnu.org> ---
sadly, this seems to be a ld64 bug - present when using uncompressed EH (which
is the default for GCC on darwin).
If I manually enable compressed EH (which is the default now for the platform)
the test passes.
Will investigate whether we can yet enable compressed EH for all of GCC; it's
possible that we still emit too many other constructs that break the ld64 atom
model.
A work-around for this issue is:
{ dg-additional-options "-fno-align-functions" { target { *-*-darwin* } } }
with a FIXME comment that this is catering for an external tool bug (as usual,
we cannot expect ld64 to be fixed on any darwin < 13).
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/60563] FAIL: g++.dg/ext/sync-4.C on *-apple-darwin*
2014-03-18 10:18 [Bug target/60563] New: FAIL: g++.dg/ext/sync-4.C on *-apple-darwin* dominiq at lps dot ens.fr
` (8 preceding siblings ...)
2014-03-20 21:29 ` iains at gcc dot gnu.org
@ 2014-12-19 0:18 ` howarth at bromo dot med.uc.edu
2015-02-11 22:04 ` howarth at bromo dot med.uc.edu
10 siblings, 0 replies; 12+ messages in thread
From: howarth at bromo dot med.uc.edu @ 2014-12-19 0:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60563
howarth at bromo dot med.uc.edu changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |howarth at bromo dot med.uc.edu
--- Comment #10 from howarth at bromo dot med.uc.edu ---
(In reply to Iain Sandoe from comment #9)
> sadly, this seems to be a ld64 bug - present when using uncompressed EH
> (which is the default for GCC on darwin).
>
Have you opened a radar upstream for this ld64 bug?
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/60563] FAIL: g++.dg/ext/sync-4.C on *-apple-darwin*
2014-03-18 10:18 [Bug target/60563] New: FAIL: g++.dg/ext/sync-4.C on *-apple-darwin* dominiq at lps dot ens.fr
` (9 preceding siblings ...)
2014-12-19 0:18 ` howarth at bromo dot med.uc.edu
@ 2015-02-11 22:04 ` howarth at bromo dot med.uc.edu
10 siblings, 0 replies; 12+ messages in thread
From: howarth at bromo dot med.uc.edu @ 2015-02-11 22:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60563
--- Comment #11 from howarth at bromo dot med.uc.edu ---
(In reply to howarth from comment #10)
> (In reply to Iain Sandoe from comment #9)
> > sadly, this seems to be a ld64 bug - present when using uncompressed EH
> > (which is the default for GCC on darwin).
> >
>
> Have you opened a radar upstream for this ld64 bug?
Filed radr://19802258 and uploaded a standalone test case for the darwin linker
developer to debug with.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2015-02-11 22:04 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-18 10:18 [Bug target/60563] New: FAIL: g++.dg/ext/sync-4.C on *-apple-darwin* dominiq at lps dot ens.fr
2014-03-18 22:31 ` [Bug target/60563] " dominiq at lps dot ens.fr
2014-03-19 3:39 ` ian at gcc dot gnu.org
2014-03-19 3:44 ` ian at airs dot com
2014-03-20 11:29 ` iains at gcc dot gnu.org
2014-03-20 14:31 ` dominiq at lps dot ens.fr
2014-03-20 14:32 ` dominiq at lps dot ens.fr
2014-03-20 14:33 ` dominiq at lps dot ens.fr
2014-03-20 14:34 ` dominiq at lps dot ens.fr
2014-03-20 21:29 ` iains at gcc dot gnu.org
2014-12-19 0:18 ` howarth at bromo dot med.uc.edu
2015-02-11 22:04 ` howarth at bromo dot med.uc.edu
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).