public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug objc/25328]  New: [4.0/4.1 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1453
@ 2005-12-09 16:30 debian-gcc at lists dot debian dot org
  2005-12-09 17:00 ` [Bug middle-end/25328] " pinskia at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: debian-gcc at lists dot debian dot org @ 2005-12-09 16:30 UTC (permalink / raw)
  To: gcc-bugs

[forwarded from http://bugs.debian.org/342662]

seen with 4.0 20051201, 4.1 20051205, works with 4.0.2 20050808

$ cat test.m
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>

int main(int argc, char **argv)
{
        int status = 0;
        char msg[100] = "";

        if(!status && !strcmp(msg, "")) {
                status = 200;
                snprintf(msg, 100, "OK");
        }
        exit(0);
}
mosca@retirante:~/devel/inova/v3-cgid$ gcc -c -O1 test.m
test.m: In function 'main':
test.m:7: internal compiler error: in get_indirect_ref_operands, at
tree-ssa-operands.c:1453
Please submit a full bug report,
with preprocessed source if appropriate.


-- 
           Summary: [4.0/4.1 regression] ICE in get_indirect_ref_operands,
                    at tree-ssa-operands.c:1453
           Product: gcc
           Version: 4.0.3
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: objc
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: debian-gcc at lists dot debian dot org


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


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

* [Bug middle-end/25328] [4.0/4.1 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1453
  2005-12-09 16:30 [Bug objc/25328] New: [4.0/4.1 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1453 debian-gcc at lists dot debian dot org
@ 2005-12-09 17:00 ` pinskia at gcc dot gnu dot org
  2005-12-09 17:16 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-09 17:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2005-12-09 17:00 -------
Hmm, the main diff is:
-            msg.24 = &msg;
-            D.3575 = *msg.24;
-            iftmp.23 = (int) D.3575;
+            msg.24 = (const unsigned char * {ref-all}) &msg;
+            D.3522 = *msg.24;
+            iftmp.23 = (int) D.3522;


Someone is not folding something correctly:
D.3575_10 = *&msgD.3533


Reducing (this is not fully an objc issue, I don't know why it is only
reproducible with the objc front-end though).


-- 


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


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

* [Bug middle-end/25328] [4.0/4.1 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1453
  2005-12-09 16:30 [Bug objc/25328] New: [4.0/4.1 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1453 debian-gcc at lists dot debian dot org
  2005-12-09 17:00 ` [Bug middle-end/25328] " pinskia at gcc dot gnu dot org
@ 2005-12-09 17:16 ` pinskia at gcc dot gnu dot org
  2005-12-19 19:24 ` mmitchel at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-09 17:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2005-12-09 17:16 -------
Reduced testcase:
int main(int argc, char **argv)
{
        int status = 0;
        char msg[100] = "";
        if(__builtin_strcmp(msg, ""))
                status = 200;
}

There a couple of issue here, first DCE is not removing some code even though
it is dead code but that is not the real issue.  The real issue is that DOM is
ICEing, it is not folding *&a to a or a[0] since a is an array.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
      Known to work|4.0.1                       |4.0.1 4.2.0
   Last reconfirmed|0000-00-00 00:00:00         |2005-12-09 17:16:30
               date|                            |
   Target Milestone|---                         |4.0.3


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


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

* [Bug middle-end/25328] [4.0/4.1 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1453
  2005-12-09 16:30 [Bug objc/25328] New: [4.0/4.1 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1453 debian-gcc at lists dot debian dot org
  2005-12-09 17:00 ` [Bug middle-end/25328] " pinskia at gcc dot gnu dot org
  2005-12-09 17:16 ` pinskia at gcc dot gnu dot org
@ 2005-12-19 19:24 ` mmitchel at gcc dot gnu dot org
  2005-12-20 21:33 ` law at redhat dot com
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-12-19 19:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from mmitchel at gcc dot gnu dot org  2005-12-19 19:24 -------
ICE on very plausible code: P1.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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


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

* [Bug middle-end/25328] [4.0/4.1 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1453
  2005-12-09 16:30 [Bug objc/25328] New: [4.0/4.1 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1453 debian-gcc at lists dot debian dot org
                   ` (2 preceding siblings ...)
  2005-12-19 19:24 ` mmitchel at gcc dot gnu dot org
@ 2005-12-20 21:33 ` law at redhat dot com
  2005-12-21  4:33 ` law at redhat dot com
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: law at redhat dot com @ 2005-12-20 21:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from law at redhat dot com  2005-12-20 21:33 -------
I've been unable to reproduce this with the gcc-4.1 branch sources.  IT's going
to be awful difficult to fix if I can't reproduce the problem.

At the very least I'll need the before-dom dumps and some analysis of whatever
transformation is causing the problem.

Note that a failure to fold is more likely a symptom of a problem elsewhere,
like mucked up types and such -- which may also explain why this has been
reported as front-end specific.

Jeff


-- 


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


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

* [Bug middle-end/25328] [4.0/4.1 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1453
  2005-12-09 16:30 [Bug objc/25328] New: [4.0/4.1 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1453 debian-gcc at lists dot debian dot org
                   ` (3 preceding siblings ...)
  2005-12-20 21:33 ` law at redhat dot com
@ 2005-12-21  4:33 ` law at redhat dot com
  2005-12-21  4:44 ` law at redhat dot com
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: law at redhat dot com @ 2005-12-21  4:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from law at redhat dot com  2005-12-21 04:33 -------
Was able to reproduce with gcc-4.0 branch sources.  Investigating, looks like
we might have a type botch somewhere...

Jeff


-- 


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


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

* [Bug middle-end/25328] [4.0/4.1 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1453
  2005-12-09 16:30 [Bug objc/25328] New: [4.0/4.1 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1453 debian-gcc at lists dot debian dot org
                   ` (4 preceding siblings ...)
  2005-12-21  4:33 ` law at redhat dot com
@ 2005-12-21  4:44 ` law at redhat dot com
  2005-12-22  9:33 ` jakub at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: law at redhat dot com @ 2005-12-21  4:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from law at redhat dot com  2005-12-21 04:44 -------
Definitely a type problem.  The Obj-C front-end is playing it too lose with
types.  

main (argc, argv)
{
  char msg[100];
  int status;
  const unsigned char D.1189;
  char * msg.0;

  # BLOCK 0
  # PRED: ENTRY (fallthru)
  #   msg_3 = V_MUST_DEF <msg_2>;
  msg = "";
  msg.0_4 = &msg;               /* Mis-matched types here */
  #   VUSE <msg_3>;
  D.1189_5 = *msg.0_4;          /* And again here.  */
  return;
  # SUCC: EXIT

}

I *think* the right code is that msg.0 should have type
const unsigned char *.  In the assignment to msg.0_4 the
RHS should be casted to const unsigned char *

This is a front-end problem as far as I can tell.
Jeff


-- 


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


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

* [Bug middle-end/25328] [4.0/4.1 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1453
  2005-12-09 16:30 [Bug objc/25328] New: [4.0/4.1 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1453 debian-gcc at lists dot debian dot org
                   ` (5 preceding siblings ...)
  2005-12-21  4:44 ` law at redhat dot com
@ 2005-12-22  9:33 ` jakub at gcc dot gnu dot org
  2005-12-22 13:03 ` [Bug objc/25328] " jakub at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-12-22  9:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jakub at gcc dot gnu dot org  2005-12-22 09:33 -------
The types are only messed up during gimplification though, into gimplify_expr
goes in both C and ObjC:
if (*(const unsigned charD.10 * {ref-all}) (const charD.1 *) &msgD.1465 != 0)
  {
    statusD.1464 = 200;
  }

Not sure why this is marked as 4.1 regression, both
4.1.0 20051214 and current gcc-4_1-branch SVN don't fail on this and gimplify
the testcase the same (correctly) in both cc1 and cc1obj and there are no ICEs
with it.


-- 


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


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

* [Bug objc/25328] [4.0/4.1 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1453
  2005-12-09 16:30 [Bug objc/25328] New: [4.0/4.1 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1453 debian-gcc at lists dot debian dot org
                   ` (6 preceding siblings ...)
  2005-12-22  9:33 ` jakub at gcc dot gnu dot org
@ 2005-12-22 13:03 ` jakub at gcc dot gnu dot org
  2005-12-22 23:05 ` [Bug objc/25328] [4.0 " jakub at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-12-22 13:03 UTC (permalink / raw)
  To: gcc-bugs



-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
          Component|middle-end                  |objc
   Last reconfirmed|2005-12-09 17:16:30         |2005-12-22 13:03:43
               date|                            |


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


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

* [Bug objc/25328] [4.0 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1453
  2005-12-09 16:30 [Bug objc/25328] New: [4.0/4.1 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1453 debian-gcc at lists dot debian dot org
                   ` (7 preceding siblings ...)
  2005-12-22 13:03 ` [Bug objc/25328] " jakub at gcc dot gnu dot org
@ 2005-12-22 23:05 ` jakub at gcc dot gnu dot org
  2005-12-22 23:07 ` jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-12-22 23:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from jakub at gcc dot gnu dot org  2005-12-22 23:05 -------
Subject: Bug 25328

Author: jakub
Date: Thu Dec 22 23:05:20 2005
New Revision: 108982

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=108982
Log:
        PR objc/25328
        * c-typeck.c (comptypes): If objc_comptypes returned < 0,
        but TYPE_MODE or TYPE_REF_CAN_ALIAS_ALL differs between t1
        and t2, make sure 0 is returned.

        * objc/execute/pr25328.m: New test.

Added:
    branches/gcc-4_0-branch/gcc/testsuite/objc/execute/pr25328.m
Modified:
    branches/gcc-4_0-branch/gcc/ChangeLog
    branches/gcc-4_0-branch/gcc/c-typeck.c
    branches/gcc-4_0-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug objc/25328] [4.0 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1453
  2005-12-09 16:30 [Bug objc/25328] New: [4.0/4.1 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1453 debian-gcc at lists dot debian dot org
                   ` (8 preceding siblings ...)
  2005-12-22 23:05 ` [Bug objc/25328] [4.0 " jakub at gcc dot gnu dot org
@ 2005-12-22 23:07 ` jakub at gcc dot gnu dot org
  2005-12-22 23:09 ` jakub at gcc dot gnu dot org
  2005-12-22 23:10 ` jakub at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-12-22 23:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from jakub at gcc dot gnu dot org  2005-12-22 23:07 -------
Subject: Bug 25328

Author: jakub
Date: Thu Dec 22 23:07:19 2005
New Revision: 108983

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=108983
Log:
        PR objc/25328
        * objc/execute/pr25328.m: New test.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/objc/execute/pr25328.m
Modified:
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug objc/25328] [4.0 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1453
  2005-12-09 16:30 [Bug objc/25328] New: [4.0/4.1 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1453 debian-gcc at lists dot debian dot org
                   ` (9 preceding siblings ...)
  2005-12-22 23:07 ` jakub at gcc dot gnu dot org
@ 2005-12-22 23:09 ` jakub at gcc dot gnu dot org
  2005-12-22 23:10 ` jakub at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-12-22 23:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from jakub at gcc dot gnu dot org  2005-12-22 23:09 -------
Subject: Bug 25328

Author: jakub
Date: Thu Dec 22 23:09:48 2005
New Revision: 108984

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=108984
Log:
        PR objc/25328
        * objc/execute/pr25328.m: New test.

Added:
    trunk/gcc/testsuite/objc/execute/pr25328.m
Modified:
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug objc/25328] [4.0 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1453
  2005-12-09 16:30 [Bug objc/25328] New: [4.0/4.1 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1453 debian-gcc at lists dot debian dot org
                   ` (10 preceding siblings ...)
  2005-12-22 23:09 ` jakub at gcc dot gnu dot org
@ 2005-12-22 23:10 ` jakub at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-12-22 23:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from jakub at gcc dot gnu dot org  2005-12-22 23:10 -------
Fixed in SVN.


-- 

jakub at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2005-12-22 23:10 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-09 16:30 [Bug objc/25328] New: [4.0/4.1 regression] ICE in get_indirect_ref_operands, at tree-ssa-operands.c:1453 debian-gcc at lists dot debian dot org
2005-12-09 17:00 ` [Bug middle-end/25328] " pinskia at gcc dot gnu dot org
2005-12-09 17:16 ` pinskia at gcc dot gnu dot org
2005-12-19 19:24 ` mmitchel at gcc dot gnu dot org
2005-12-20 21:33 ` law at redhat dot com
2005-12-21  4:33 ` law at redhat dot com
2005-12-21  4:44 ` law at redhat dot com
2005-12-22  9:33 ` jakub at gcc dot gnu dot org
2005-12-22 13:03 ` [Bug objc/25328] " jakub at gcc dot gnu dot org
2005-12-22 23:05 ` [Bug objc/25328] [4.0 " jakub at gcc dot gnu dot org
2005-12-22 23:07 ` jakub at gcc dot gnu dot org
2005-12-22 23:09 ` jakub at gcc dot gnu dot org
2005-12-22 23:10 ` jakub at gcc dot gnu dot 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).