[Bug lto/55525] ICE: tree check: expected array_type, have pointer_type in array_ref_low_bound, at expr.c:6768

2013-01-07 Thread ro at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55525



Rainer Orth ro at gcc dot gnu.org changed:



   What|Removed |Added



 CC||ro at gcc dot gnu.org



--- Comment #6 from Rainer Orth ro at gcc dot gnu.org 2013-01-07 14:47:53 UTC 
---

Unfortunately, the testcase fails for 32-bit on Solaris with Sun ld:



ld: fatal: symbol 's' has differing sizes:

(file c_lto_pr55525_0.o value=0x8; file c_lto_pr55525_1.o value=0x4);

tentative symbol cannot override defined symbol of smaller size

ld: fatal: file processing errors. No output written to

gcc-dg-lto-pr55525-01.ex

e

collect2: error: ld returned 1 exit status



  Rainer


[Bug lto/55525] ICE: tree check: expected array_type, have pointer_type in array_ref_low_bound, at expr.c:6768

2013-01-07 Thread rguenther at suse dot de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55525



--- Comment #7 from rguenther at suse dot de rguenther at suse dot de 
2013-01-07 14:55:31 UTC ---

On Mon, 7 Jan 2013, ro at gcc dot gnu.org wrote:



 

 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55525

 

 Rainer Orth ro at gcc dot gnu.org changed:

 

What|Removed |Added

 

  CC||ro at gcc dot gnu.org

 

 --- Comment #6 from Rainer Orth ro at gcc dot gnu.org 2013-01-07 14:47:53 
 UTC ---

 Unfortunately, the testcase fails for 32-bit on Solaris with Sun ld:

 

 ld: fatal: symbol 's' has differing sizes:

 (file c_lto_pr55525_0.o value=0x8; file c_lto_pr55525_1.o value=0x4);

 tentative symbol cannot override defined symbol of smaller size

 ld: fatal: file processing errors. No output written to

 gcc-dg-lto-pr55525-01.ex

 e

 collect2: error: ld returned 1 exit status



Does it work with replacing char s[8] with char s[sizeof (char *)]?



If so, patch is ok.



Richard.


[Bug lto/55525] ICE: tree check: expected array_type, have pointer_type in array_ref_low_bound, at expr.c:6768

2012-12-05 Thread rguenth at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55525



--- Comment #4 from Richard Biener rguenth at gcc dot gnu.org 2012-12-05 
08:47:45 UTC ---

Author: rguenth

Date: Wed Dec  5 08:47:40 2012

New Revision: 194183



URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=194183

Log:

2012-12-05  Richard Biener  rguent...@suse.de



PR lto/55525

* gimple-streamer-in.c (input_gimple_stmt): Fixup ARRAY_REFs as well.



* gcc.dg/lto/pr55525_0.c: New testcase.

* gcc.dg/lto/pr55525_1.c: Likewise.



Added:

trunk/gcc/testsuite/gcc.dg/lto/pr55525_0.c

trunk/gcc/testsuite/gcc.dg/lto/pr55525_1.c

Modified:

trunk/gcc/ChangeLog

trunk/gcc/gimple-streamer-in.c

trunk/gcc/testsuite/ChangeLog


[Bug lto/55525] ICE: tree check: expected array_type, have pointer_type in array_ref_low_bound, at expr.c:6768

2012-12-05 Thread rguenth at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55525



Richard Biener rguenth at gcc dot gnu.org changed:



   What|Removed |Added



 Status|ASSIGNED|RESOLVED

 Resolution||FIXED

   Target Milestone|--- |4.8.0



--- Comment #5 from Richard Biener rguenth at gcc dot gnu.org 2012-12-05 
09:32:46 UTC ---

Fixed on trunk.


[Bug lto/55525] ICE: tree check: expected array_type, have pointer_type in array_ref_low_bound, at expr.c:6768

2012-11-29 Thread rguenth at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55525



Richard Biener rguenth at gcc dot gnu.org changed:



   What|Removed |Added



 Status|UNCONFIRMED |ASSIGNED

   Last reconfirmed||2012-11-29

 AssignedTo|unassigned at gcc dot   |rguenth at gcc dot gnu.org

   |gnu.org |

 Ever Confirmed|0   |1



--- Comment #3 from Richard Biener rguenth at gcc dot gnu.org 2012-11-29 
08:53:09 UTC ---

Mine.



I suppose we could simply error out for the mismatch.  The issue here is of

course that we simply substitute the prevailing declaration into expressions

that expect the mismatching type.



Let me think a bit more about this.


[Bug lto/55525] ICE: tree check: expected array_type, have pointer_type in array_ref_low_bound, at expr.c:6768

2012-11-28 Thread d.g.gorbachev at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55525



Dmitry Gorbachev d.g.gorbachev at gmail dot com changed:



   What|Removed |Added



  Attachment #28826|application/octet-stream|text/plain

  mime type||



--- Comment #1 from Dmitry Gorbachev d.g.gorbachev at gmail dot com 
2012-11-29 02:55:03 UTC ---

Comment on attachment 28826

  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28826

Testcase



4.6.4 and 4.7.3:

internal compiler error: in substitute_placeholder_in_expr, at tree.c:3418



4.6.4 (with checking):

internal compiler error: tree check: expected array_type, have pointer_type in

array_ref_low_bound, at expr.c:6410



4.7.3 (with checking):

internal compiler error: tree check: expected array_type, have pointer_type in

array_ref_low_bound, at expr.c:6820


[Bug lto/55525] ICE: tree check: expected array_type, have pointer_type in array_ref_low_bound, at expr.c:6768

2012-11-28 Thread d.g.gorbachev at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55525



--- Comment #2 from Dmitry Gorbachev d.g.gorbachev at gmail dot com 
2012-11-29 03:07:21 UTC ---

4.8.0:



In file included from :0:0:

1.c:3:6: warning: type of 's' does not match original declaration [enabled by

default]

 char s[8];

  ^

In file included from 1.c:8:0,

 from :0:

2.c:1:7: note: previously declared here

 char *s = (char *) 0;

   ^

In file included from 1.c:8:0,

 from :2:

1.c: In function 'main':

1.c:7:3: internal compiler error: tree check: expected array_type, have

pointer_type in array_ref_low_bound, at expr.c:6768

   return strcmp(s[1], foo);

   ^

0x87f7ab4 tree_check_failed(tree_node const*, char const*, int, char const*,

...)

../../gcc-4.8/gcc/tree.c:8955

0x815572e tree_check(tree_node*, char const*, int, char const*, tree_code)

../../gcc-4.8/gcc/tree.h:3680

0x82c5aec array_ref_low_bound(tree_node*)

../../gcc-4.8/gcc/expr.c:6768

0x82c5118 get_inner_reference(tree_node*, long long*, long long*, tree_node**,

machine_mode*, int*, int*, bool)

../../gcc-4.8/gcc/expr.c:6616

0x817d9d4 get_object_alignment_2

../../gcc-4.8/gcc/builtins.c:295

0x817e46a get_pointer_alignment_1(tree_node*, unsigned int*, unsigned long

long*)

../../gcc-4.8/gcc/builtins.c:493

0x817e6e0 get_pointer_alignment(tree_node*)

../../gcc-4.8/gcc/builtins.c:540

0x8187fd8 expand_builtin_strcmp

../../gcc-4.8/gcc/builtins.c:3768

0x818f7d8 expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int)

../../gcc-4.8/gcc/builtins.c:6193

0x82d407d expand_expr_real_1(tree_node*, rtx_def*, machine_mode,

expand_modifier, rtx_def**)

../../gcc-4.8/gcc/expr.c:10108

0x82c96a3 expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,

rtx_def**)

../../gcc-4.8/gcc/expr.c:7816

0x82beec7 store_expr(tree_node*, rtx_def*, int, bool)

../../gcc-4.8/gcc/expr.c:5192

0x82bdd8f expand_assignment(tree_node*, tree_node*, bool)

../../gcc-4.8/gcc/expr.c:4978

0x81d275a expand_call_stmt

../../gcc-4.8/gcc/cfgexpand.c:2113

0x81d2851 expand_gimple_stmt_1

../../gcc-4.8/gcc/cfgexpand.c:2153

0x81d2e99 expand_gimple_stmt

../../gcc-4.8/gcc/cfgexpand.c:2305

0x81d9a28 expand_gimple_basic_block

../../gcc-4.8/gcc/cfgexpand.c:4084

0x81db331 gimple_expand_cfg

../../gcc-4.8/gcc/cfgexpand.c:4603