public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/64200] New: ICE: in decide_alg, at config/i386/i386.c:24510 with -mmemcpy-strategy=libcall:-1:align -minline-stringops-dynamically
@ 2014-12-05 18:48 zsojka at seznam dot cz
  2014-12-05 20:15 ` [Bug target/64200] " hjl.tools at gmail dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: zsojka at seznam dot cz @ 2014-12-05 18:48 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 64200
           Summary: ICE: in decide_alg, at config/i386/i386.c:24510 with
                    -mmemcpy-strategy=libcall:-1:align
                    -minline-stringops-dynamically
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz

Created attachment 34202
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34202&action=edit
reduced testcase

Compiler output:
$ gcc -mmemcpy-strategy=libcall:-1:align -minline-stringops-dynamically
testcase.c testcase.c: In function 'foo':
testcase.c:14:5: internal compiler error: in decide_alg, at
config/i386/i386.c:24510
   d = __builtin_va_arg(ap, typeof (d));
     ^
0xf110d2 decide_alg
        /mnt/svn/gcc-trunk/gcc/config/i386/i386.c:24510
0xf59cff ix86_expand_set_or_movmem(rtx_def*, rtx_def*, rtx_def*, rtx_def*,
rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, bool)
        /mnt/svn/gcc-trunk/gcc/config/i386/i386.c:24763
0x106cefe gen_movmemdi(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*,
rtx_def*, rtx_def*, rtx_def*, rtx_def*)
        /mnt/svn/gcc-trunk/gcc/config/i386/i386.md:15893
0xb19eb2 insn_gen_fn::operator()(rtx_def*, rtx_def*, rtx_def*, rtx_def*,
rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*) const
        /mnt/svn/gcc-trunk/gcc/recog.h:310
0xb19eb2 maybe_gen_insn(insn_code, unsigned int, expand_operand*)
        /mnt/svn/gcc-trunk/gcc/optabs.c:8395
0xb1a4c8 maybe_expand_insn(insn_code, unsigned int, expand_operand*)
        /mnt/svn/gcc-trunk/gcc/optabs.c:8407
0x8d8b9e emit_block_move_via_movmem
        /mnt/svn/gcc-trunk/gcc/expr.c:1330
0x8d8b9e emit_block_move_hints(rtx_def*, rtx_def*, rtx_def*, block_op_methods,
unsigned int, long, unsigned long, unsigned long, unsigned long)
        /mnt/svn/gcc-trunk/gcc/expr.c:1148
0x7974d1 expand_builtin_memcpy_args
        /mnt/svn/gcc-trunk/gcc/builtins.c:3241
0x7a6f1c expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int)
        /mnt/svn/gcc-trunk/gcc/builtins.c:6286
0x8d4716 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /mnt/svn/gcc-trunk/gcc/expr.c:10471
0x7caf89 expand_expr
        /mnt/svn/gcc-trunk/gcc/expr.h:299
0x7caf89 expand_call_stmt
        /mnt/svn/gcc-trunk/gcc/cfgexpand.c:2347
0x7cb6bf expand_gimple_stmt_1
        /mnt/svn/gcc-trunk/gcc/cfgexpand.c:3293
0x7cb6bf expand_gimple_stmt
        /mnt/svn/gcc-trunk/gcc/cfgexpand.c:3447
0x7d0c53 expand_gimple_basic_block
        /mnt/svn/gcc-trunk/gcc/cfgexpand.c:5280
0x7d3146 execute
        /mnt/svn/gcc-trunk/gcc/cfgexpand.c:5889
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

Tested revisions:
r218413 - ICE (after PR64108 fix)
4_9 r218177 - ICE


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/64200] ICE: in decide_alg, at config/i386/i386.c:24510 with -mmemcpy-strategy=libcall:-1:align -minline-stringops-dynamically
  2014-12-05 18:48 [Bug target/64200] New: ICE: in decide_alg, at config/i386/i386.c:24510 with -mmemcpy-strategy=libcall:-1:align -minline-stringops-dynamically zsojka at seznam dot cz
@ 2014-12-05 20:15 ` hjl.tools at gmail dot com
  2014-12-06 11:33 ` hjl at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: hjl.tools at gmail dot com @ 2014-12-05 20:15 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-12-05
                 CC|                            |ubizjak at gmail dot com
   Target Milestone|---                         |5.0
     Ever confirmed|0                           |1

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
GCC manual says:

'-minline-stringops-dynamically'
     For string operations of unknown size, use run-time checks with
     inline code for small blocks and a library call for large blocks.

Why are there

     gcc_assert (alg != libcall);
      if (TARGET_INLINE_STRINGOPS_DYNAMICALLY)
        *dynamic_check = max;
      return alg;

libcall should be fine for TARGET_INLINE_STRINGOPS_DYNAMICALLY.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/64200] ICE: in decide_alg, at config/i386/i386.c:24510 with -mmemcpy-strategy=libcall:-1:align -minline-stringops-dynamically
  2014-12-05 18:48 [Bug target/64200] New: ICE: in decide_alg, at config/i386/i386.c:24510 with -mmemcpy-strategy=libcall:-1:align -minline-stringops-dynamically zsojka at seznam dot cz
  2014-12-05 20:15 ` [Bug target/64200] " hjl.tools at gmail dot com
@ 2014-12-06 11:33 ` hjl at gcc dot gnu.org
  2014-12-08 13:35 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: hjl at gcc dot gnu.org @ 2014-12-06 11:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> ---
Author: hjl
Date: Sat Dec  6 11:32:46 2014
New Revision: 218446

URL: https://gcc.gnu.org/viewcvs?rev=218446&root=gcc&view=rev
Log:
Don't assert "alg != libcall" for -minline-stringops-dynamically

gcc/

    PR target/64200
    * config/i386/i386.c (decide_alg): Don't assert "alg != libcall"
    for TARGET_INLINE_STRINGOPS_DYNAMICALLY.

gcc/testsuite/

    PR target/64200
    * gcc.target/i386/memcpy-strategy-4.c: New test.

Added:
    trunk/gcc/testsuite/gcc.target/i386/memcpy-strategy-4.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/64200] ICE: in decide_alg, at config/i386/i386.c:24510 with -mmemcpy-strategy=libcall:-1:align -minline-stringops-dynamically
  2014-12-05 18:48 [Bug target/64200] New: ICE: in decide_alg, at config/i386/i386.c:24510 with -mmemcpy-strategy=libcall:-1:align -minline-stringops-dynamically zsojka at seznam dot cz
  2014-12-05 20:15 ` [Bug target/64200] " hjl.tools at gmail dot com
  2014-12-06 11:33 ` hjl at gcc dot gnu.org
@ 2014-12-08 13:35 ` rguenth at gcc dot gnu.org
  2014-12-14 13:05 ` hjl at gcc dot gnu.org
  2014-12-14 13:06 ` hjl.tools at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-12-08 13:35 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/64200] ICE: in decide_alg, at config/i386/i386.c:24510 with -mmemcpy-strategy=libcall:-1:align -minline-stringops-dynamically
  2014-12-05 18:48 [Bug target/64200] New: ICE: in decide_alg, at config/i386/i386.c:24510 with -mmemcpy-strategy=libcall:-1:align -minline-stringops-dynamically zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2014-12-08 13:35 ` rguenth at gcc dot gnu.org
@ 2014-12-14 13:05 ` hjl at gcc dot gnu.org
  2014-12-14 13:06 ` hjl.tools at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: hjl at gcc dot gnu.org @ 2014-12-14 13:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> ---
Author: hjl
Date: Sun Dec 14 13:05:06 2014
New Revision: 218718

URL: https://gcc.gnu.org/viewcvs?rev=218718&root=gcc&view=rev
Log:
Don't assert "alg != libcall" for -minline-stringops-dynamically

Backported from mainline:

gcc/

    PR target/64200
    * config/i386/i386.c (decide_alg): Don't assert "alg != libcall"
    for TARGET_INLINE_STRINGOPS_DYNAMICALLY.

gcc/testsuite/

    PR target/64200
    * gcc.target/i386/memcpy-strategy-4.c: New test.

Added:
    branches/gcc-4_9-branch/gcc/testsuite/gcc.target/i386/memcpy-strategy-4.c
Modified:
    branches/gcc-4_9-branch/gcc/ChangeLog
    branches/gcc-4_9-branch/gcc/config/i386/i386.c
    branches/gcc-4_9-branch/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/64200] ICE: in decide_alg, at config/i386/i386.c:24510 with -mmemcpy-strategy=libcall:-1:align -minline-stringops-dynamically
  2014-12-05 18:48 [Bug target/64200] New: ICE: in decide_alg, at config/i386/i386.c:24510 with -mmemcpy-strategy=libcall:-1:align -minline-stringops-dynamically zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2014-12-14 13:05 ` hjl at gcc dot gnu.org
@ 2014-12-14 13:06 ` hjl.tools at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: hjl.tools at gmail dot com @ 2014-12-14 13:06 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|5.0                         |4.9.3

--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed for 4.9 and trunk.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-12-14 13:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-05 18:48 [Bug target/64200] New: ICE: in decide_alg, at config/i386/i386.c:24510 with -mmemcpy-strategy=libcall:-1:align -minline-stringops-dynamically zsojka at seznam dot cz
2014-12-05 20:15 ` [Bug target/64200] " hjl.tools at gmail dot com
2014-12-06 11:33 ` hjl at gcc dot gnu.org
2014-12-08 13:35 ` rguenth at gcc dot gnu.org
2014-12-14 13:05 ` hjl at gcc dot gnu.org
2014-12-14 13:06 ` hjl.tools at gmail dot com

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).