public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/29059]  New: [4.2 regression] ICE: verify_stmts failed (invalid operand to unary operator ""[0];)
@ 2006-09-13  8:24 tbm at gcc dot gnu dot org
  2006-09-13 16:17 ` [Bug c++/29059] " pinskia at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: tbm at gcc dot gnu dot org @ 2006-09-13  8:24 UTC (permalink / raw)
  To: gcc-bugs

Compiling as C works, C++ fails.  This worked with 20060823.

(sid)118:tbm@em64t: ~] /usr/lib/gcc-snapshot/bin/g++ -c -O re-ru32un.c
re-ru32un.c: In function 'void LoadUserAlph(char*)':
re-ru32un.c:4: error: invalid operand to unary operator
""[0];

re-ru32un.c:4: internal compiler error: verify_stmts failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.1/README.Bugs>.
zsh: exit 1     /usr/lib/gcc-snapshot/bin/g++ -c -O re-ru32un.c
(sid)119:tbm@em64t: ~] /usr/lib/gcc-snapshot/bin/g++ -c re-ru32un.c
(sid)120:tbm@em64t: ~] /usr/lib/gcc-snapshot/bin/gcc -c -O re-ru32un.c
(sid)121:tbm@em64t: ~] cat re-ru32un.c
extern char *strcpy (char *__restrict __dest, __const char *__restrict __src);
char wrkstr_un[270];
extern void
LoadUserAlph (char *s)
{
  s = wrkstr_un;
  strcpy (s, "");
};


-- 
           Summary: [4.2 regression] ICE: verify_stmts failed (invalid
                    operand to unary operator ""[0];)
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tbm at gcc dot gnu dot org


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


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

* [Bug c++/29059] [4.2 regression] ICE: verify_stmts failed (invalid operand to unary operator ""[0];)
  2006-09-13  8:24 [Bug c++/29059] New: [4.2 regression] ICE: verify_stmts failed (invalid operand to unary operator ""[0];) tbm at gcc dot gnu dot org
@ 2006-09-13 16:17 ` pinskia at gcc dot gnu dot org
  2006-09-13 18:13 ` janis at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-13 16:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-09-13 16:17 -------
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |ice-checking, ice-on-valid-
                   |                            |code
   Last reconfirmed|0000-00-00 00:00:00         |2006-09-13 16:17:26
               date|                            |
   Target Milestone|---                         |4.2.0


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


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

* [Bug c++/29059] [4.2 regression] ICE: verify_stmts failed (invalid operand to unary operator ""[0];)
  2006-09-13  8:24 [Bug c++/29059] New: [4.2 regression] ICE: verify_stmts failed (invalid operand to unary operator ""[0];) tbm at gcc dot gnu dot org
  2006-09-13 16:17 ` [Bug c++/29059] " pinskia at gcc dot gnu dot org
@ 2006-09-13 18:13 ` janis at gcc dot gnu dot org
  2006-09-13 18:34 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: janis at gcc dot gnu dot org @ 2006-09-13 18:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from janis at gcc dot gnu dot org  2006-09-13 18:13 -------
A regression hunt on powerpc-linux identified the following patch:

    http://gcc.gnu.org/viewcvs?view=rev&rev=116656

    r116656 | jakub | 2006-09-02 06:55:09 +0000 (Sat, 02 Sep 2006)

Interestingly enough, I've been looking into runtime failures in FreePOOMA that
started with the same patch.


-- 


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


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

* [Bug c++/29059] [4.2 regression] ICE: verify_stmts failed (invalid operand to unary operator ""[0];)
  2006-09-13  8:24 [Bug c++/29059] New: [4.2 regression] ICE: verify_stmts failed (invalid operand to unary operator ""[0];) tbm at gcc dot gnu dot org
  2006-09-13 16:17 ` [Bug c++/29059] " pinskia at gcc dot gnu dot org
  2006-09-13 18:13 ` janis at gcc dot gnu dot org
@ 2006-09-13 18:34 ` pinskia at gcc dot gnu dot org
  2006-09-13 21:33 ` tbm at cyrius dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-13 18:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-09-13 18:34 -------
(In reply to comment #2)
> A regression hunt on powerpc-linux identified the following patch:

This is what I was expecting actually, I might look at this later, we might
just need a fold (read from constant string) so we can fold ""[0] correctly.


-- 


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


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

* [Bug c++/29059] [4.2 regression] ICE: verify_stmts failed (invalid operand to unary operator ""[0];)
  2006-09-13  8:24 [Bug c++/29059] New: [4.2 regression] ICE: verify_stmts failed (invalid operand to unary operator ""[0];) tbm at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-09-13 18:34 ` pinskia at gcc dot gnu dot org
@ 2006-09-13 21:33 ` tbm at cyrius dot com
  2006-09-14  4:11 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: tbm at cyrius dot com @ 2006-09-13 21:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from tbm at cyrius dot com  2006-09-13 21:33 -------
Here's a C testcase:

tbm@coconut0:~$ /usr/lib/gcc-snapshot/bin/gcc -c -O -Wwrite-strings
bsdgames-input.c
bsdgames-input.c: In function 'rezero':
bsdgames-input.c:15: error: invalid operand to unary operator
""[0];

bsdgames-input.c:15: internal compiler error: verify_stmts failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.1/README.Bugs>.
tbm@coconut0:~$ cat bsdgames-input.c
extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
  __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
typedef struct
{
}
RULE;
typedef struct
{
  char str[20];
}
STACK;
STACK stack[15];
int level;
rezero ()
{
  level = 0;
  strcpy (stack[level].str, "");
}


-- 


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


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

* [Bug c++/29059] [4.2 regression] ICE: verify_stmts failed (invalid operand to unary operator ""[0];)
  2006-09-13  8:24 [Bug c++/29059] New: [4.2 regression] ICE: verify_stmts failed (invalid operand to unary operator ""[0];) tbm at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-09-13 21:33 ` tbm at cyrius dot com
@ 2006-09-14  4:11 ` pinskia at gcc dot gnu dot org
  2006-09-14  4:12 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-14  4:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gcc dot gnu dot org  2006-09-14 04:11 -------
*** Bug 29070 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tbm at cyrius dot com


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


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

* [Bug c++/29059] [4.2 regression] ICE: verify_stmts failed (invalid operand to unary operator ""[0];)
  2006-09-13  8:24 [Bug c++/29059] New: [4.2 regression] ICE: verify_stmts failed (invalid operand to unary operator ""[0];) tbm at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-09-14  4:11 ` pinskia at gcc dot gnu dot org
@ 2006-09-14  4:12 ` pinskia at gcc dot gnu dot org
  2006-09-16 22:52 ` [Bug tree-optimization/29059] " pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-14  4:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pinskia at gcc dot gnu dot org  2006-09-14 04:12 -------
Mine I have a patch.
set_rhs forgets to reject MODIFY_EXPRs right away.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


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


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

* [Bug tree-optimization/29059] [4.2 regression] ICE: verify_stmts failed (invalid operand to unary operator ""[0];)
  2006-09-13  8:24 [Bug c++/29059] New: [4.2 regression] ICE: verify_stmts failed (invalid operand to unary operator ""[0];) tbm at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2006-09-14  4:12 ` pinskia at gcc dot gnu dot org
@ 2006-09-16 22:52 ` pinskia at gcc dot gnu dot org
  2006-09-16 22:52 ` pinskia at gcc dot gnu dot org
  2007-06-26 11:49 ` jakub at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-16 22:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pinskia at gcc dot gnu dot org  2006-09-16 22:52 -------
Fixed.


-- 

pinskia at gcc dot gnu dot org changed:

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


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


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

* [Bug tree-optimization/29059] [4.2 regression] ICE: verify_stmts failed (invalid operand to unary operator ""[0];)
  2006-09-13  8:24 [Bug c++/29059] New: [4.2 regression] ICE: verify_stmts failed (invalid operand to unary operator ""[0];) tbm at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2006-09-16 22:52 ` [Bug tree-optimization/29059] " pinskia at gcc dot gnu dot org
@ 2006-09-16 22:52 ` pinskia at gcc dot gnu dot org
  2007-06-26 11:49 ` jakub at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-16 22:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pinskia at gcc dot gnu dot org  2006-09-16 22:52 -------
Subject: Bug 29059

Author: pinskia
Date: Sat Sep 16 22:52:11 2006
New Revision: 116997

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=116997
Log:
2006-09-16  Andrew Pinski  <pinskia@physics.uc.edu>

        PR tree-opt/29059
        * gcc.c-torture/compile/strcpy-1.c: New test.
        * gcc.c-torture/compile/strcpy-2.c: New test.
        * gcc.c-torture/compile/memcpy-1.c: New test.
        * gcc.c-torture/compile/memcpy-2.c: New test.

2006-09-16  Andrew Pinski  <pinskia@physics.uc.edu>

        PR tree-opt/29059
        * tree-ssa-propagate.c (set_rhs): Reject MODIFY_EXPR right
        away for the expr argument.


Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/memcpy-1.c
    trunk/gcc/testsuite/gcc.c-torture/compile/memcpy-2.c
    trunk/gcc/testsuite/gcc.c-torture/compile/strcpy-1.c
    trunk/gcc/testsuite/gcc.c-torture/compile/strcpy-2.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-propagate.c


-- 


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


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

* [Bug tree-optimization/29059] [4.2 regression] ICE: verify_stmts failed (invalid operand to unary operator ""[0];)
  2006-09-13  8:24 [Bug c++/29059] New: [4.2 regression] ICE: verify_stmts failed (invalid operand to unary operator ""[0];) tbm at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2006-09-16 22:52 ` pinskia at gcc dot gnu dot org
@ 2007-06-26 11:49 ` jakub at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-06-26 11:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from jakub at gcc dot gnu dot org  2007-06-26 11:49 -------
Subject: Bug 29059

Author: jakub
Date: Tue Jun 26 11:48:55 2007
New Revision: 126024

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126024
Log:
        PR tree-opt/29059
        * tree-ssa-propagate.c (set_rhs): Reject MODIFY_EXPR right
        away for the expr argument.

        * gcc.c-torture/compile/strcpy-1.c: New test.
        * gcc.c-torture/compile/strcpy-2.c: New test.
        * gcc.c-torture/compile/memcpy-1.c: New test.
        * gcc.c-torture/compile/memcpy-2.c: New test.

Added:
   
branches/redhat/gcc-4_1-branch/gcc/testsuite/gcc.c-torture/compile/memcpy-1.c
   
branches/redhat/gcc-4_1-branch/gcc/testsuite/gcc.c-torture/compile/memcpy-2.c
   
branches/redhat/gcc-4_1-branch/gcc/testsuite/gcc.c-torture/compile/strcpy-1.c
   
branches/redhat/gcc-4_1-branch/gcc/testsuite/gcc.c-torture/compile/strcpy-2.c
Modified:
    branches/redhat/gcc-4_1-branch/gcc/ChangeLog
    branches/redhat/gcc-4_1-branch/gcc/testsuite/ChangeLog
    branches/redhat/gcc-4_1-branch/gcc/tree-ssa-propagate.c


-- 


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


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

end of thread, other threads:[~2007-06-26 11:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-13  8:24 [Bug c++/29059] New: [4.2 regression] ICE: verify_stmts failed (invalid operand to unary operator ""[0];) tbm at gcc dot gnu dot org
2006-09-13 16:17 ` [Bug c++/29059] " pinskia at gcc dot gnu dot org
2006-09-13 18:13 ` janis at gcc dot gnu dot org
2006-09-13 18:34 ` pinskia at gcc dot gnu dot org
2006-09-13 21:33 ` tbm at cyrius dot com
2006-09-14  4:11 ` pinskia at gcc dot gnu dot org
2006-09-14  4:12 ` pinskia at gcc dot gnu dot org
2006-09-16 22:52 ` [Bug tree-optimization/29059] " pinskia at gcc dot gnu dot org
2006-09-16 22:52 ` pinskia at gcc dot gnu dot org
2007-06-26 11:49 ` 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).