public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/66084] New: ICE:internal compiler error: in fold_convert_loc, at fold-const.c:1974
@ 2015-05-09  7:02 zhongyunde at huawei dot com
  2015-05-09  7:10 ` [Bug c/66084] " zhongyunde at huawei dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: zhongyunde at huawei dot com @ 2015-05-09  7:02 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 66084
           Summary: ICE:internal compiler error: in fold_convert_loc, at
                    fold-const.c:1974
           Product: gcc
           Version: 4.7.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zhongyunde at huawei dot com
  Target Milestone: ---

Created attachment 35509
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35509&action=edit
a small case compile with -O2 can reproduce the issue

bug issue:
crash1.c: In function 'func_32':
crash1.c:1128:1: internal compiler error: in fold_convert_loc, at
fold-const.c:1974
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


1972:         TREE_TYPE (orig), arg));
1973:      gcc_assert (TREE_CODE (orig) == VECTOR_TYPE
1974:             && "tree_int_cst_equal (TYPE_SIZE (type), TYPE_SIZE
(orig))");
1975:      return fold_build1_loc (loc, NOP_EXPR, type, arg);

testcase:
__attribute__ ((vector_size (16))) g_73 = {0x15FE687EL, 0x5827DF98L,
0xF8411272L, 0x235E695dL};
__attribute__ ((vector_size (16))) g_1124;

int func_1(void)
{  
    __attribute__ ((vector_size (16))) l_1117 = {0x15FE688EL, 0x5827DF98L,
0xF8411272L, 0x235E695EL};
    __attribute__ ((vector_size (16))) zhong = ( g_73  <= g_73);
        g_1124 = (((g_73 < l_1117) == zhong) << 9)    ;

    return 0;
}


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

* [Bug c/66084] ICE:internal compiler error: in fold_convert_loc, at fold-const.c:1974
  2015-05-09  7:02 [Bug c/66084] New: ICE:internal compiler error: in fold_convert_loc, at fold-const.c:1974 zhongyunde at huawei dot com
@ 2015-05-09  7:10 ` zhongyunde at huawei dot com
  2015-05-09  7:16 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: zhongyunde at huawei dot com @ 2015-05-09  7:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from vfdff <zhongyunde at huawei dot com> ---
the following try can fix the issue, but need consider the reason why the
gcc_assert is added original ?

[zhongyunde@linux-root ~/6183_hcc/gcc/gcc-4.7.0/gcc]$svn diff  fold-const.c
Index: fold-const.c
===================================================================
--- fold-const.c        (revision 128101)
+++ fold-const.c        (working copy)
@@ -1970,8 +1970,7 @@
        return fold_convert_loc (loc, type,
                             fold_build1_loc (loc, REALPART_EXPR,
                                          TREE_TYPE (orig), arg));
-      gcc_assert (TREE_CODE (orig) == VECTOR_TYPE
-                 && tree_int_cst_equal (TYPE_SIZE (type), TYPE_SIZE (orig)));
+      gcc_assert (TREE_CODE (orig) == VECTOR_TYPE);
       return fold_build1_loc (loc, NOP_EXPR, type, arg);

     case REAL_TYPE:


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

* [Bug c/66084] ICE:internal compiler error: in fold_convert_loc, at fold-const.c:1974
  2015-05-09  7:02 [Bug c/66084] New: ICE:internal compiler error: in fold_convert_loc, at fold-const.c:1974 zhongyunde at huawei dot com
  2015-05-09  7:10 ` [Bug c/66084] " zhongyunde at huawei dot com
@ 2015-05-09  7:16 ` pinskia at gcc dot gnu.org
  2015-05-09 10:17 ` [Bug middle-end/66084] " glisse at gcc dot gnu.org
  2015-05-12 11:53 ` zhongyunde at huawei dot com
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-05-09  7:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The assert is correct in that it is checking that the size of what is being
converted to a vector type is the same size as the vector.

The problem is more likely before that point.


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

* [Bug middle-end/66084] ICE:internal compiler error: in fold_convert_loc, at fold-const.c:1974
  2015-05-09  7:02 [Bug c/66084] New: ICE:internal compiler error: in fold_convert_loc, at fold-const.c:1974 zhongyunde at huawei dot com
  2015-05-09  7:10 ` [Bug c/66084] " zhongyunde at huawei dot com
  2015-05-09  7:16 ` pinskia at gcc dot gnu.org
@ 2015-05-09 10:17 ` glisse at gcc dot gnu.org
  2015-05-12 11:53 ` zhongyunde at huawei dot com
  3 siblings, 0 replies; 5+ messages in thread
From: glisse at gcc dot gnu.org @ 2015-05-09 10:17 UTC (permalink / raw)
  To: gcc-bugs

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

Marc Glisse <glisse at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
      Known to work|                            |4.8.4
         Resolution|---                         |FIXED

--- Comment #3 from Marc Glisse <glisse at gcc dot gnu.org> ---
Again, 4.7 is not supported anymore. Please test with a more recent version.


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

* [Bug middle-end/66084] ICE:internal compiler error: in fold_convert_loc, at fold-const.c:1974
  2015-05-09  7:02 [Bug c/66084] New: ICE:internal compiler error: in fold_convert_loc, at fold-const.c:1974 zhongyunde at huawei dot com
                   ` (2 preceding siblings ...)
  2015-05-09 10:17 ` [Bug middle-end/66084] " glisse at gcc dot gnu.org
@ 2015-05-12 11:53 ` zhongyunde at huawei dot com
  3 siblings, 0 replies; 5+ messages in thread
From: zhongyunde at huawei dot com @ 2015-05-12 11:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from vfdff <zhongyunde at huawei dot com> ---
ok, it is ok based on gcc 4.9.2, thanks.
$GCC492/gcc ticket_1634.c -O2


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

end of thread, other threads:[~2015-05-12 11:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-09  7:02 [Bug c/66084] New: ICE:internal compiler error: in fold_convert_loc, at fold-const.c:1974 zhongyunde at huawei dot com
2015-05-09  7:10 ` [Bug c/66084] " zhongyunde at huawei dot com
2015-05-09  7:16 ` pinskia at gcc dot gnu.org
2015-05-09 10:17 ` [Bug middle-end/66084] " glisse at gcc dot gnu.org
2015-05-12 11:53 ` zhongyunde at huawei 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).