public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/15062] New: Invalid operand to binary operator
@ 2004-04-22 5:39 aj at gcc dot gnu dot org
2004-04-22 7:58 ` [Bug c/15062] " aj at gcc dot gnu dot org
` (14 more replies)
0 siblings, 15 replies; 16+ messages in thread
From: aj at gcc dot gnu dot org @ 2004-04-22 5:39 UTC (permalink / raw)
To: gcc-bugs
Building glibc with current GCC tree-ssa, I get an ICE:
$
/opt/gcc/tree-ssa-20020619-branch/libexec/gcc/x86_64-suse-linux-gnu/3.5-tree-ssa/cc1
-fpreprocessed s_nextafter.i -quiet -dumpbase s_nextafter.c -mtune=k8 -g -O2
-Wall -Winline -Wstrict-prototypes -Wwrite-strings -Wno-uninitialized -std=gnu99
-version -o s_nextafter.s -m32
GNU C version 3.5-tree-ssa 20040421 (merged 20040414) (x86_64-suse-linux-gnu)
compiled by GNU C version 3.5-tree-ssa 20040421 (merged 20040414).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
s_nextafter.i: In function `__nextafter':
s_nextafter.i:21: error: Invalid operand to binary operator
x<D1102>
s_nextafter.i:21: error: Invalid operand to binary operator
x<D1102>
s_nextafter.i:21: error: Invalid operand to binary operator
x<D1102>
s_nextafter.i:21: error: Invalid operand to binary operator
x<D1102>
s_nextafter.i:21: error: Invalid operand to binary operator
x<D1102>
s_nextafter.i:21: 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.
--
Summary: Invalid operand to binary operator
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: aj at gcc dot gnu dot org
CC: dnovillo at redhat dot com,gcc-bugs at gcc dot gnu dot
org
GCC build triplet: x86_64-linux-gnu
GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15062
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c/15062] Invalid operand to binary operator
2004-04-22 5:39 [Bug c/15062] New: Invalid operand to binary operator aj at gcc dot gnu dot org
@ 2004-04-22 7:58 ` aj at gcc dot gnu dot org
2004-04-22 11:18 ` falk at debian dot org
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: aj at gcc dot gnu dot org @ 2004-04-22 7:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From aj at gcc dot gnu dot org 2004-04-22 05:25 -------
Created an attachment (id=6136)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6136&action=view)
Preprocessed source file
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15062
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c/15062] Invalid operand to binary operator
2004-04-22 5:39 [Bug c/15062] New: Invalid operand to binary operator aj at gcc dot gnu dot org
2004-04-22 7:58 ` [Bug c/15062] " aj at gcc dot gnu dot org
@ 2004-04-22 11:18 ` falk at debian dot org
2004-04-22 12:36 ` [Bug c/15062] [tree-ssa]Invalid " pinskia at gcc dot gnu dot org
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: falk at debian dot org @ 2004-04-22 11:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From falk at debian dot org 2004-04-22 09:37 -------
I can confirm this on alphaev68-linux with tree-ssa 20040416. Test case:
void next (double x) {
x = x + x;
asm("" : : "m"(x));
}
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15062
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c/15062] [tree-ssa]Invalid operand to binary operator
2004-04-22 5:39 [Bug c/15062] New: Invalid operand to binary operator aj at gcc dot gnu dot org
2004-04-22 7:58 ` [Bug c/15062] " aj at gcc dot gnu dot org
2004-04-22 11:18 ` falk at debian dot org
@ 2004-04-22 12:36 ` pinskia at gcc dot gnu dot org
2004-04-22 17:48 ` bbooth at redhat dot com
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-22 12:36 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-04-22 11:34 -------
Here is the reduced sources I came up with on i686:
double a(double x)
{
x = x+x;
asm ("" : "=m"(x) );
return x;
}
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Summary|Invalid operand to binary |[tree-ssa]Invalid operand to
|operator |binary operator
Target Milestone|--- |tree-ssa
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15062
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c/15062] [tree-ssa]Invalid operand to binary operator
2004-04-22 5:39 [Bug c/15062] New: Invalid operand to binary operator aj at gcc dot gnu dot org
` (2 preceding siblings ...)
2004-04-22 12:36 ` [Bug c/15062] [tree-ssa]Invalid " pinskia at gcc dot gnu dot org
@ 2004-04-22 17:48 ` bbooth at redhat dot com
2004-05-04 12:14 ` [Bug middle-end/15062] " steven at gcc dot gnu dot org
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: bbooth at redhat dot com @ 2004-04-22 17:48 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bbooth at redhat dot com 2004-04-22 17:32 -------
>From what I can tell, it looks like 'x' is being marked as addressable when the
asm expression is gimplified and after the x=x+x expression is gimplified,
making 'x' an invalid operand in the x=x+x expression.
My knowledge of the gimplifier is limited, so I don't know exactly how to fix this.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |bbooth at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15062
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/15062] [tree-ssa]Invalid operand to binary operator
2004-04-22 5:39 [Bug c/15062] New: Invalid operand to binary operator aj at gcc dot gnu dot org
` (3 preceding siblings ...)
2004-04-22 17:48 ` bbooth at redhat dot com
@ 2004-05-04 12:14 ` steven at gcc dot gnu dot org
2004-05-04 12:45 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-05-04 12:14 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2004-05-04 12:14 -------
Hmmm... With:
GNU C version 3.5-tree-ssa 20040504 (merged 20040428) (x86_64-unknown-linux-gnu)
compiled by GNU C version 3.5-tree-ssa 20040504 (merged 20040428)
I can't reproduce this. Not with the small test case and also not with Andreas'
test case.
Andreas, do you still see this problem?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15062
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/15062] [tree-ssa]Invalid operand to binary operator
2004-04-22 5:39 [Bug c/15062] New: Invalid operand to binary operator aj at gcc dot gnu dot org
` (4 preceding siblings ...)
2004-05-04 12:14 ` [Bug middle-end/15062] " steven at gcc dot gnu dot org
@ 2004-05-04 12:45 ` pinskia at gcc dot gnu dot org
2004-05-04 15:57 ` bbooth at redhat dot com
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-04 12:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-04 12:45 -------
I cannot reproduce any more with the example given here or my simple example.
Is this fixed?
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15062
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/15062] [tree-ssa]Invalid operand to binary operator
2004-04-22 5:39 [Bug c/15062] New: Invalid operand to binary operator aj at gcc dot gnu dot org
` (5 preceding siblings ...)
2004-05-04 12:45 ` pinskia at gcc dot gnu dot org
@ 2004-05-04 15:57 ` bbooth at redhat dot com
2004-05-04 16:06 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: bbooth at redhat dot com @ 2004-05-04 15:57 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bbooth at redhat dot com 2004-05-04 15:57 -------
I can reproduce this with the following at -O3:
double __nextafter(double x, double y)
{
int ix;
unsigned int lx;
if((ix-0x7ff00000)!=0)
return x+y;
asm ("" : "=m"(x) : "m"(x));
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15062
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/15062] [tree-ssa]Invalid operand to binary operator
2004-04-22 5:39 [Bug c/15062] New: Invalid operand to binary operator aj at gcc dot gnu dot org
` (6 preceding siblings ...)
2004-05-04 15:57 ` bbooth at redhat dot com
@ 2004-05-04 16:06 ` pinskia at gcc dot gnu dot org
2004-05-04 17:57 ` aj at gcc dot gnu dot org
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-04 16:06 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-04 16:06 -------
I forgot that I compiled my compiler with checking disabled, so this might still happen.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
Keywords| |ice-checking
Last reconfirmed|0000-00-00 00:00:00 |2004-05-04 16:06:57
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15062
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/15062] [tree-ssa]Invalid operand to binary operator
2004-04-22 5:39 [Bug c/15062] New: Invalid operand to binary operator aj at gcc dot gnu dot org
` (7 preceding siblings ...)
2004-05-04 16:06 ` pinskia at gcc dot gnu dot org
@ 2004-05-04 17:57 ` aj at gcc dot gnu dot org
2004-05-05 5:00 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: aj at gcc dot gnu dot org @ 2004-05-04 17:57 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From aj at gcc dot gnu dot org 2004-05-04 17:57 -------
It still fails - both with the glibc compilation and with the
testcase in #2:
$ /opt/gcc/tree-ssa-20020619-branch/bin/gcc t.c -O3 -v
Reading specs from
/opt/gcc/tree-ssa-20020619-branch/lib/gcc/x86_64-suse-linux-gnu/3.5-tree-ssa/specs
Configured with: /cvs/gcc-tree-ssa-20020619-branch/configure
--prefix=/opt/gcc/tree-ssa-20020619-branch --disable-nls --enable-threads=posix
--enable-clocale=gnu --enable-__cxa_atexit --enable-shared
--enable-languages=c,c++,java,f95,objc --with-system-zlib x86_64-suse-linux-gnu
Thread model: posix
gcc version 3.5-tree-ssa 20040504 (merged 20040428)
/opt/gcc/tree-ssa-20020619-branch/libexec/gcc/x86_64-suse-linux-gnu/3.5-tree-ssa/cc1
-quiet -v t.c -quiet -dumpbase t.c -mtune=k8 -auxbase t -O3 -version -o
/tmp/cc47HhQa.s
ignoring nonexistent directory
"/opt/gcc/tree-ssa-20020619-branch/lib/gcc/x86_64-suse-linux-gnu/3.5-tree-ssa/../../../../x86_64-suse-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/opt/gcc/tree-ssa-20020619-branch/include
/opt/gcc/tree-ssa-20020619-branch/lib/gcc/x86_64-suse-linux-gnu/3.5-tree-ssa/include
/usr/include
End of search list.
GNU C version 3.5-tree-ssa 20040504 (merged 20040428) (x86_64-suse-linux-gnu)
compiled by GNU C version 3.5-tree-ssa 20040504 (merged 20040428).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
t.c: In function `next':
t.c:1: error: Invalid operand to binary operator
x<D1452>
t.c:1: 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.
Please test again with checking enabled, I would expect that this error occurs
only if checking is enabled.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15062
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/15062] [tree-ssa]Invalid operand to binary operator
2004-04-22 5:39 [Bug c/15062] New: Invalid operand to binary operator aj at gcc dot gnu dot org
` (8 preceding siblings ...)
2004-05-04 17:57 ` aj at gcc dot gnu dot org
@ 2004-05-05 5:00 ` pinskia at gcc dot gnu dot org
2004-05-05 5:12 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-05 5:00 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-05 05:00 -------
I think I have a patch which fixes the problem, it marks the operand while converting to
generic to be makred as addressable which I am testing right now.
--
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=15062
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/15062] [tree-ssa]Invalid operand to binary operator
2004-04-22 5:39 [Bug c/15062] New: Invalid operand to binary operator aj at gcc dot gnu dot org
` (9 preceding siblings ...)
2004-05-05 5:00 ` pinskia at gcc dot gnu dot org
@ 2004-05-05 5:12 ` pinskia at gcc dot gnu dot org
2004-05-05 6:08 ` [Bug c/15062] " pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-05 5:12 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-05 05:12 -------
Happens every where so make the host/target/build fields empty.
--
What |Removed |Added
----------------------------------------------------------------------------
GCC build triplet|x86_64-linux-gnu |
GCC host triplet|x86_64-linux-gnu |
GCC target triplet|x86_64-linux-gnu |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15062
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c/15062] [tree-ssa]Invalid operand to binary operator
2004-04-22 5:39 [Bug c/15062] New: Invalid operand to binary operator aj at gcc dot gnu dot org
` (10 preceding siblings ...)
2004-05-05 5:12 ` pinskia at gcc dot gnu dot org
@ 2004-05-05 6:08 ` pinskia at gcc dot gnu dot org
2004-05-05 6:24 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-05 6:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-05 06:08 -------
Actually the easy fix is to copy what the C++ front-end does and that fixes the problem. I
will submit a patch for that.
--
What |Removed |Added
----------------------------------------------------------------------------
Component|middle-end |c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15062
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c/15062] [tree-ssa]Invalid operand to binary operator
2004-04-22 5:39 [Bug c/15062] New: Invalid operand to binary operator aj at gcc dot gnu dot org
` (11 preceding siblings ...)
2004-05-05 6:08 ` [Bug c/15062] " pinskia at gcc dot gnu dot org
@ 2004-05-05 6:24 ` pinskia at gcc dot gnu dot org
2004-05-05 14:19 ` cvs-commit at gcc dot gnu dot org
2004-05-05 14:21 ` pinskia at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-05 6:24 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-05 06:24 -------
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-05/msg00218.html>.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15062
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c/15062] [tree-ssa]Invalid operand to binary operator
2004-04-22 5:39 [Bug c/15062] New: Invalid operand to binary operator aj at gcc dot gnu dot org
` (12 preceding siblings ...)
2004-05-05 6:24 ` pinskia at gcc dot gnu dot org
@ 2004-05-05 14:19 ` cvs-commit at gcc dot gnu dot org
2004-05-05 14:21 ` pinskia at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-05-05 14:19 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-05-05 14:19 -------
Subject: Bug 15062
CVSROOT: /cvs/gcc
Module name: gcc
Branch: tree-ssa-20020619-branch
Changes by: pinskia@gcc.gnu.org 2004-05-05 14:19:27
Modified files:
gcc : ChangeLog.tree-ssa c-typeck.c
gcc/testsuite : ChangeLog.tree-ssa
Log message:
2004-04-05 Andrew Pinski <pinskia@physics.uc.edu>
PR c/15062
* c-typeck.c (build_asm_expr): Mark the output operands
to an asm addressable, if necessary.
2004-05-05 Andrew Pinski <pinskia@physics.uc.edu>
PR c/15062
* gcc.c-torture/compile/pr15062.c: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.tree-ssa.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.2.1358&r2=1.1.2.1359
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.196.2.49&r2=1.196.2.50
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.tree-ssa.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.2.234&r2=1.1.2.235
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15062
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c/15062] [tree-ssa]Invalid operand to binary operator
2004-04-22 5:39 [Bug c/15062] New: Invalid operand to binary operator aj at gcc dot gnu dot org
` (13 preceding siblings ...)
2004-05-05 14:19 ` cvs-commit at gcc dot gnu dot org
@ 2004-05-05 14:21 ` pinskia at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-05 14:21 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-05 14:21 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15062
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2004-05-05 14:21 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-22 5:39 [Bug c/15062] New: Invalid operand to binary operator aj at gcc dot gnu dot org
2004-04-22 7:58 ` [Bug c/15062] " aj at gcc dot gnu dot org
2004-04-22 11:18 ` falk at debian dot org
2004-04-22 12:36 ` [Bug c/15062] [tree-ssa]Invalid " pinskia at gcc dot gnu dot org
2004-04-22 17:48 ` bbooth at redhat dot com
2004-05-04 12:14 ` [Bug middle-end/15062] " steven at gcc dot gnu dot org
2004-05-04 12:45 ` pinskia at gcc dot gnu dot org
2004-05-04 15:57 ` bbooth at redhat dot com
2004-05-04 16:06 ` pinskia at gcc dot gnu dot org
2004-05-04 17:57 ` aj at gcc dot gnu dot org
2004-05-05 5:00 ` pinskia at gcc dot gnu dot org
2004-05-05 5:12 ` pinskia at gcc dot gnu dot org
2004-05-05 6:08 ` [Bug c/15062] " pinskia at gcc dot gnu dot org
2004-05-05 6:24 ` pinskia at gcc dot gnu dot org
2004-05-05 14:19 ` cvs-commit at gcc dot gnu dot org
2004-05-05 14:21 ` pinskia 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).