public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/63937] New: [5 Regression] Compiling a very simple fortran code fails.
@ 2014-11-18 15:42 dominiq at lps dot ens.fr
2014-11-18 15:53 ` [Bug fortran/63937] " dominiq at lps dot ens.fr
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-11-18 15:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63937
Bug ID: 63937
Summary: [5 Regression] Compiling a very simple fortran code
fails.
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: dominiq at lps dot ens.fr
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/63937] [5 Regression] Compiling a very simple fortran code fails.
2014-11-18 15:42 [Bug fortran/63937] New: [5 Regression] Compiling a very simple fortran code fails dominiq at lps dot ens.fr
@ 2014-11-18 15:53 ` dominiq at lps dot ens.fr
2014-11-18 16:13 ` [Bug target/63937] [5 Regression] Compiling large arrays fails fxcoudert at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-11-18 15:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63937
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fxcoudert at gcc dot gnu.org,
| |iains at gcc dot gnu.org
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Hit return too soon!-(
The test is
implicit none
integer :: v(0:2_8**32-1)
v = 0
end
On x86_64-apple-darwin14 it compiles in a fraction a second with r216747 (or
older) while it fails to compile after more that 4 minutes and grabbing 16Gb of
memory at r217100 and above:
gfc: internal compiler error: Killed: 9 (program f951)
Abort
158.958u 81.130s 4:19.95 92.3% 0+0k 4+2io 5pf+0w
Note that due to the many overlapping bootstrap failures, bisecting is a real
nightmare.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/63937] [5 Regression] Compiling large arrays fails
2014-11-18 15:42 [Bug fortran/63937] New: [5 Regression] Compiling a very simple fortran code fails dominiq at lps dot ens.fr
2014-11-18 15:53 ` [Bug fortran/63937] " dominiq at lps dot ens.fr
@ 2014-11-18 16:13 ` fxcoudert at gcc dot gnu.org
2014-11-18 16:44 ` iains at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-11-18 16:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63937
Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |x86_64-apple-darwin14
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-11-18
Component|fortran |target
CC| |amylaar at gcc dot gnu.org,
| |jgreenhalgh at gcc dot gnu.org
Host| |x86_64-apple-darwin14
Ever confirmed|0 |1
Summary|[5 Regression] Compiling a |[5 Regression] Compiling
|very simple fortran code |large arrays fails
|fails. |
Target Milestone|--- |5.0
Build| |x86_64-apple-darwin14
--- Comment #2 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
I can confirm, and can provide a C testcase (on x86_64-apple-darwin14 with
trunk r217694):
$ cat a.c
void foo (void)
{
int v[1073741825] = {};
}
$ ./bin/gcc a.c
[blows up]
And I know it sounds weird, but the behavior depends on the exact value of the
array size, in a deterministic manner. It fails for 1073741825 (every time),
but works with both 1003741825 (smaller) and 1173741825 (bigger).
I stopped it at some random moments in this long "freeze", and the stable part
of the backtrace is:
frame #4: 0x00000001005c662a cc1`store_by_pieces_1 + 183 at expr.c:2721
frame #5: 0x00000001005c6573 cc1`store_by_pieces_1(data=0x00007fff5fbff190,
align=64) + 275
frame #6: 0x00000001005d98d0 cc1`clear_storage_hints(rtx_def*, rtx_def*,
block_op_methods, unsigned int, long long, unsigned long long, unsigned long
long, unsigned long long) + 58 at expr.c:2605
frame #7: 0x00000001005d9896
cc1`clear_storage_hints(object=0x0000000142e44738, size=0x0000000142e46060,
method=BLOCK_OP_NORMAL, expected_align=0, expected_size=-1,
min_size=4294967300, max_size=4294967300, probable_max_size=4294967300) + 486
I'm not sure when that change occurred, but the only thing related to
"store_by_pieces" I could find in the ChangeLog is a series of commits:
2014-11-01 James Greenhalgh <james.greenhalgh@arm.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/63937] [5 Regression] Compiling large arrays fails
2014-11-18 15:42 [Bug fortran/63937] New: [5 Regression] Compiling a very simple fortran code fails dominiq at lps dot ens.fr
2014-11-18 15:53 ` [Bug fortran/63937] " dominiq at lps dot ens.fr
2014-11-18 16:13 ` [Bug target/63937] [5 Regression] Compiling large arrays fails fxcoudert at gcc dot gnu.org
@ 2014-11-18 16:44 ` iains at gcc dot gnu.org
2014-11-18 16:54 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: iains at gcc dot gnu.org @ 2014-11-18 16:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63937
Iain Sandoe <iains at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target|x86_64-apple-darwin14 |x86_64-apple-darwin14,
| |x86_64-linux-gnu
Host|x86_64-apple-darwin14 |x86_64-apple-darwin14,
| |x86_64-linux-gnu
Build|x86_64-apple-darwin14 |x86_64-apple-darwin14,
| |x86_64-linux-gnu
--- Comment #3 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Francois-Xavier Coudert from comment #2)
> I can confirm, and can provide a C testcase (on x86_64-apple-darwin14 with
> void foo (void)
> {
> int v[1073741825] = {};
> }
> $ ./bin/gcc a.c
> [blows up]
also blows up with 217427 on x86_64-linux-gnu (i quit the compile after 2mins
and 35G of VM showing)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/63937] [5 Regression] Compiling large arrays fails
2014-11-18 15:42 [Bug fortran/63937] New: [5 Regression] Compiling a very simple fortran code fails dominiq at lps dot ens.fr
` (2 preceding siblings ...)
2014-11-18 16:44 ` iains at gcc dot gnu.org
@ 2014-11-18 16:54 ` jakub at gcc dot gnu.org
2014-11-18 17:03 ` jgreenhalgh at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-11-18 16:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63937
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Caused by r216996.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/63937] [5 Regression] Compiling large arrays fails
2014-11-18 15:42 [Bug fortran/63937] New: [5 Regression] Compiling a very simple fortran code fails dominiq at lps dot ens.fr
` (3 preceding siblings ...)
2014-11-18 16:54 ` jakub at gcc dot gnu.org
@ 2014-11-18 17:03 ` jgreenhalgh at gcc dot gnu.org
2014-11-18 17:10 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jgreenhalgh at gcc dot gnu.org @ 2014-11-18 17:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63937
jgreenhalgh at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
--- Comment #5 from jgreenhalgh at gcc dot gnu.org ---
Mine. unsigned int overflow makes us think we can set the whole array in one
instruction (we can't).
TARGET_USE_BY_PIECES_INFRASTRUCTURE_P should be using "unsigned HOST_WIDE_INT"
as its callers expect, rather than "unsigned int".
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/63937] [5 Regression] Compiling large arrays fails
2014-11-18 15:42 [Bug fortran/63937] New: [5 Regression] Compiling a very simple fortran code fails dominiq at lps dot ens.fr
` (4 preceding siblings ...)
2014-11-18 17:03 ` jgreenhalgh at gcc dot gnu.org
@ 2014-11-18 17:10 ` jakub at gcc dot gnu.org
2014-11-18 22:46 ` jgreenhalgh at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-11-18 17:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63937
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
/* PR target/63937 */
/* { dg-do compile { target lp64 } } */
/* { dg-options "-O2" } */
void foo (char *p)
{
p = __builtin_assume_aligned (p, 64);
__builtin_memset (p, 0, 0x100000001ULL);
}
might be better testcase for the testsuite (or, also use one or both the other
ones, but guard them with { i?86-* x86_64-* } && lp64, not sure if all 64-bit
targets support huge frames.
As for the fix, the right fix agreed on IRC is replace unsigned int type for
sizes with unsigned HOST_WIDE_INT in the target hook.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/63937] [5 Regression] Compiling large arrays fails
2014-11-18 15:42 [Bug fortran/63937] New: [5 Regression] Compiling a very simple fortran code fails dominiq at lps dot ens.fr
` (5 preceding siblings ...)
2014-11-18 17:10 ` jakub at gcc dot gnu.org
@ 2014-11-18 22:46 ` jgreenhalgh at gcc dot gnu.org
2014-11-18 22:46 ` jgreenhalgh at gcc dot gnu.org
2014-12-04 18:19 ` yroux at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: jgreenhalgh at gcc dot gnu.org @ 2014-11-18 22:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63937
jgreenhalgh at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #8 from jgreenhalgh at gcc dot gnu.org ---
Should now be fixed.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/63937] [5 Regression] Compiling large arrays fails
2014-11-18 15:42 [Bug fortran/63937] New: [5 Regression] Compiling a very simple fortran code fails dominiq at lps dot ens.fr
` (6 preceding siblings ...)
2014-11-18 22:46 ` jgreenhalgh at gcc dot gnu.org
@ 2014-11-18 22:46 ` jgreenhalgh at gcc dot gnu.org
2014-12-04 18:19 ` yroux at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: jgreenhalgh at gcc dot gnu.org @ 2014-11-18 22:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63937
--- Comment #7 from jgreenhalgh at gcc dot gnu.org ---
Author: jgreenhalgh
Date: Tue Nov 18 22:45:21 2014
New Revision: 217742
URL: https://gcc.gnu.org/viewcvs?rev=217742&root=gcc&view=rev
Log:
[Patch] PR target/63937 TARGET_USE_BY_PIECES_INFRASTRUCTURE_P should take an
unsigned HOST_WIDE_INT size argument
gcc/
PR target/63937
* target.def (use_by_pieces_infrastructure_p): Take unsigned
HOST_WIDE_INT as the size parameter.
* targhooks.c (default_use_by_pieces_infrastructure_p): Likewise.
* targhooks.h (default_use_by_pieces_infrastructure_p): Likewise.
* config/arc/arc.c (arc_use_by_pieces_infrastructure_p)): Likewise.
* config/mips/mips.c (mips_use_by_pieces_infrastructure_p)): Likewise.
* config/s390/s390.c (s390_use_by_pieces_infrastructure_p)): Likewise.
* config/sh/sh.c (sh_use_by_pieces_infrastructure_p)): Likewise.
* config/aarch64/aarch64.c
(aarch64_use_by_pieces_infrastructure_p)): Likewise.
* doc/tm.texi: Regenerate.
gcc/testsuite/
PR target/63937
* gcc.dg/memset-2.c: New.
Added:
trunk/gcc/testsuite/gcc.dg/memset-2.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/aarch64/aarch64.c
trunk/gcc/config/arc/arc.c
trunk/gcc/config/mips/mips.c
trunk/gcc/config/s390/s390.c
trunk/gcc/config/sh/sh.c
trunk/gcc/doc/tm.texi
trunk/gcc/target.def
trunk/gcc/targhooks.c
trunk/gcc/targhooks.h
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/63937] [5 Regression] Compiling large arrays fails
2014-11-18 15:42 [Bug fortran/63937] New: [5 Regression] Compiling a very simple fortran code fails dominiq at lps dot ens.fr
` (7 preceding siblings ...)
2014-11-18 22:46 ` jgreenhalgh at gcc dot gnu.org
@ 2014-12-04 18:19 ` yroux at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: yroux at gcc dot gnu.org @ 2014-12-04 18:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63937
--- Comment #9 from Yvan Roux <yroux at gcc dot gnu.org> ---
Author: yroux
Date: Thu Dec 4 18:19:01 2014
New Revision: 218390
URL: https://gcc.gnu.org/viewcvs?rev=218390&root=gcc&view=rev
Log:
gcc/
2014-12-04 Yvan Roux <yvan.roux@linaro.org>
Backport from trunk r216996, r216998, r216999, r217001, r217002, r217003,
r217004, r217742.
2014-11-18 James Greenhalgh <james.greenhalgh@arm.com>
PR target/63937
* target.def (use_by_pieces_infrastructure_p): Take unsigned
HOST_WIDE_INT as the size parameter.
* targhooks.c (default_use_by_pieces_infrastructure_p): Likewise.
* targhooks.h (default_use_by_pieces_infrastructure_p): Likewise.
* config/arc/arc.c (arc_use_by_pieces_infrastructure_p)): Likewise.
* config/mips/mips.c (mips_use_by_pieces_infrastructure_p)): Likewise.
* config/s390/s390.c (s390_use_by_pieces_infrastructure_p)): Likewise.
* config/sh/sh.c (sh_use_by_pieces_infrastructure_p)): Likewise.
* config/aarch64/aarch64.c
(aarch64_use_by_pieces_infrastructure_p)): Likewise.
* doc/tm.texi: Regenerate.
2014-11-01 James Greenhalgh <james.greenhalgh@arm.com>
* doc/tm.texi.in (MOVE_BY_PIECES_P): Remove.
(CLEAR_BY_PIECES_P): Likewise.
(SET_BY_PIECES_P): Likewise.
(STORE_BY_PIECES_P): Likewise.
* doc/tm.texi: Regenerate.
* system.h: Poison MOVE_BY_PIECES_P, CLEAR_BY_PIECES_P,
SET_BY_PIECES_P, STORE_BY_PIECES_P.
* expr.c (MOVE_BY_PIECES_P): Remove.
(CLEAR_BY_PIECES_P): Likewise.
(SET_BY_PIECES_P): Likewise.
(STORE_BY_PIECES_P): Likewise.
(can_move_by_pieces): Rewrite in terms of
targetm.use_by_pieces_infrastructure_p.
(emit_block_move_hints): Likewise.
(can_store_by_pieces): Likewise.
(store_by_pieces): Likewise.
(clear_storage_hints): Likewise.
(emit_push_insn): Likewise.
(expand_constructor): Likewise.
2014-11-01 James Greenhalgh <james.greenhalgh@arm.com>
* config/aarch64/aarch64.c
(aarch64_use_by_pieces_infrastructre_p): New.
(TARGET_USE_BY_PIECES_INFRASTRUCTURE): Likewise.
* config/aarch64/aarch64.h (STORE_BY_PIECES_P): Delete.
2014-11-01 James Greenhalgh <james.greenhalgh@arm.com>
* config/mips/mips.h (MOVE_BY_PIECES_P): Remove.
(STORE_BY_PIECES_P): Likewise.
* config/mips/mips.c (TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): New.
(mips_move_by_pieces_p): Rename to...
(mips_use_by_pieces_infrastructure_p): ...this, use new hook
parameters, use the default hook implementation as a
fall-back.
2014-11-01 James Greenhalgh <james.greenhalgh@arm.com>
* config/sh/sh.c (TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): New.
(sh_use_by_pieces_infrastructure_p): Likewise.
* config/sh/sh.h (MOVE_BY_PIECES_P): Remove.
(STORE_BY_PIECES_P): Likewise.
(SET_BY_PIECES_P): Likewise.
2014-11-01 James Greenhalgh <james.greenhalgh@arm.com>
* config/arc/arc.c (TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): New.
(arc_use_by_pieces_infrastructure_p): Likewise.
* confir/arc/arc.h (MOVE_BY_PIECES_P): Delete.
(CAN_MOVE_BY_PIECES): Likewise.
2014-11-01 James Greenhalgh <james.greenhalgh@arm.com>
* config/s390/s390.c (s390_use_by_pieces_infrastructure_p): New.
(TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): Likewise.
* config/s390/s390.h (MOVE_BY_PIECES_P): Remove.
(CLEAR_BY_PIECES): Likewise.
(SET_BY_PIECES): Likewise.
(STORE_BY_PIECES): Likewise.
2014-11-01 James Greenhalgh <james.greenhalgh@arm.com>
* target.def (use_by_pieces_infrastructure_p): New.
* doc/tm.texi.in (MOVE_BY_PIECES_P): Describe that this macro
is deprecated.
(STORE_BY_PIECES_P): Likewise.
(CLEAR_BY_PIECES_P): Likewise.
(SET_BY_PIECES_P): Likewise.
(TARGET_MOVE_BY_PIECES_PROFITABLE_P): Add hook.
* doc/tm.texi: Regenerate.
* expr.c (MOVE_BY_PIECES_P): Rewrite in terms of
TARGET_USE_BY_PIECES_INFRASTRUCTURE_P.
(STORE_BY_PIECES_P): Likewise.
(CLEAR_BY_PIECES_P): Likewise.
(SET_BY_PIECES_P): Likewise.
(STORE_MAX_PIECES): Move to...
* defaults.h (STORE_MAX_PIECES): ...here.
* targhooks.c (get_move_ratio): New.
(default_use_by_pieces_infrastructure_p): Likewise.
* targhooks.h (default_use_by_pieces_infrastructure_p): New.
* target.h (by_pieces_operation): New.
gcc/testsuite/
2014-12-04 Yvan Roux <yvan.roux@linaro.org>
Backport from trunk r217742.
2014-11-18 James Greenhalgh <james.greenhalgh@arm.com>
PR target/63937
* gcc.dg/memset-2.c: New.
Added:
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.dg/memset-2.c
Modified:
branches/linaro/gcc-4_9-branch/gcc/ChangeLog.linaro
branches/linaro/gcc-4_9-branch/gcc/config/aarch64/aarch64.c
branches/linaro/gcc-4_9-branch/gcc/config/aarch64/aarch64.h
branches/linaro/gcc-4_9-branch/gcc/config/arc/arc.c
branches/linaro/gcc-4_9-branch/gcc/config/arc/arc.h
branches/linaro/gcc-4_9-branch/gcc/config/mips/mips.c
branches/linaro/gcc-4_9-branch/gcc/config/mips/mips.h
branches/linaro/gcc-4_9-branch/gcc/config/s390/s390.c
branches/linaro/gcc-4_9-branch/gcc/config/s390/s390.h
branches/linaro/gcc-4_9-branch/gcc/config/sh/sh.c
branches/linaro/gcc-4_9-branch/gcc/config/sh/sh.h
branches/linaro/gcc-4_9-branch/gcc/defaults.h
branches/linaro/gcc-4_9-branch/gcc/doc/tm.texi
branches/linaro/gcc-4_9-branch/gcc/doc/tm.texi.in
branches/linaro/gcc-4_9-branch/gcc/expr.c
branches/linaro/gcc-4_9-branch/gcc/system.h
branches/linaro/gcc-4_9-branch/gcc/target.def
branches/linaro/gcc-4_9-branch/gcc/target.h
branches/linaro/gcc-4_9-branch/gcc/targhooks.c
branches/linaro/gcc-4_9-branch/gcc/targhooks.h
branches/linaro/gcc-4_9-branch/gcc/testsuite/ChangeLog.linaro
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2014-12-04 18:19 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-18 15:42 [Bug fortran/63937] New: [5 Regression] Compiling a very simple fortran code fails dominiq at lps dot ens.fr
2014-11-18 15:53 ` [Bug fortran/63937] " dominiq at lps dot ens.fr
2014-11-18 16:13 ` [Bug target/63937] [5 Regression] Compiling large arrays fails fxcoudert at gcc dot gnu.org
2014-11-18 16:44 ` iains at gcc dot gnu.org
2014-11-18 16:54 ` jakub at gcc dot gnu.org
2014-11-18 17:03 ` jgreenhalgh at gcc dot gnu.org
2014-11-18 17:10 ` jakub at gcc dot gnu.org
2014-11-18 22:46 ` jgreenhalgh at gcc dot gnu.org
2014-11-18 22:46 ` jgreenhalgh at gcc dot gnu.org
2014-12-04 18:19 ` yroux at gcc dot gnu.org
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).