public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/13889] New: Assignement of an int to an int of different size in a struct gives ICE
@ 2004-01-27 21:42 brederlo at informatik dot uni-tuebingen dot de
  2004-01-27 21:44 ` [Bug c/13889] " brederlo at informatik dot uni-tuebingen dot de
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: brederlo at informatik dot uni-tuebingen dot de @ 2004-01-27 21:42 UTC (permalink / raw)
  To: gcc-bugs

I found ICE in ntop and reduced it to the following testcase:

struct { long long a; } *p;
void initNetFlowFunct(void) {
  unsigned int b = 4294967295U;
  p->a = b;
}

Changing the signedness or size of b or changing p hides the bug. Compiling
without optimisation also hides the bug.

% gcc-2.95 -O -c foo.c

% gcc-3.2 -O -c foo.c 
foo.c: In function `initNetFlowFunct':
foo.c:5: Internal compiler error in simplify_unary_operation, at simplify-rtx.c:636
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

% gcc-3.3 -O -c foo.c
foo.c: In function `initNetFlowFunct':
foo.c:5: internal compiler error: in simplify_unary_operation, at simplify-rtx.c:609
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

% gcc-3.3 -c foo.c  

% gcc-2.95 -v 
Reading specs from /usr/lib/gcc-lib/m68k-linux/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)

% gcc-3.2 -v
Reading specs from /usr/lib/gcc-lib/m68k-linux/3.2.3/specs
Configured with: ../src/configure -v --enable-languages=c,c++,f77,objc
--prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info
--with-gxx-include-dir=/usr/include/c++/3.2 --enable-shared --with-system-zlib
--enable-nls --without-included-gettext --enable-__cxa_atexit
--enable-clocale=gnu --enable-objc-gc m68k-linux
Thread model: posix
gcc version 3.2.3 (Debian)

% gcc-3.3 -v
Reading specs from /usr/lib/gcc-lib/m68k-linux/3.3.3/specs
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f77,pascal,objc,treelang --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib
--enable-nls --without-included-gettext --enable-__cxa_atexit
--enable-sjlj-exceptions --enable-clocale=gnu --enable-debug
--enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc m68k-linux
Thread model: posix
gcc version 3.3.3 20031206 (prerelease) (Debian)

-- 
           Summary: Assignement of an int to an int of different size in a
                    struct gives ICE
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: brederlo at informatik dot uni-tuebingen dot de
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: linux-m68k
GCC target triplet: linux-m68k


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


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

* [Bug c/13889] Assignement of an int to an int of different size in a struct gives ICE
  2004-01-27 21:42 [Bug c/13889] New: Assignement of an int to an int of different size in a struct gives ICE brederlo at informatik dot uni-tuebingen dot de
@ 2004-01-27 21:44 ` brederlo at informatik dot uni-tuebingen dot de
  2004-01-27 21:51 ` [Bug target/13889] [3.3 Regression] " pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: brederlo at informatik dot uni-tuebingen dot de @ 2004-01-27 21:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From brederlo at informatik dot uni-tuebingen dot de  2004-01-27 21:44 -------
Created an attachment (id=5597)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5597&action=view)
Testcase for the bug


-- 


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


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

* [Bug target/13889] [3.3 Regression] Assignement of an int to an int of different size in a struct gives ICE
  2004-01-27 21:42 [Bug c/13889] New: Assignement of an int to an int of different size in a struct gives ICE brederlo at informatik dot uni-tuebingen dot de
  2004-01-27 21:44 ` [Bug c/13889] " brederlo at informatik dot uni-tuebingen dot de
@ 2004-01-27 21:51 ` pinskia at gcc dot gnu dot org
  2004-01-27 22:49 ` [Bug target/13889] [3.3 Regression] Assignment " bangerth at dealii dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-27 21:51 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-27 21:51 -------
Confirmed, the problem is this RTL:
(zero_extend:DI (const_int -1 [0xffffffff]))

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|c                           |target
     Ever Confirmed|                            |1
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|0000-00-00 00:00:00         |2004-01-27 21:51:45
               date|                            |
            Summary|Assignement of an int to an |[3.3 Regression] Assignement
                   |int of different size in a  |of an int to an int of
                   |struct gives ICE            |different size in a struct
                   |                            |gives ICE
   Target Milestone|---                         |3.3.3


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


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

* [Bug target/13889] [3.3 Regression] Assignment of an int to an int of different size in a struct gives ICE
  2004-01-27 21:42 [Bug c/13889] New: Assignement of an int to an int of different size in a struct gives ICE brederlo at informatik dot uni-tuebingen dot de
  2004-01-27 21:44 ` [Bug c/13889] " brederlo at informatik dot uni-tuebingen dot de
  2004-01-27 21:51 ` [Bug target/13889] [3.3 Regression] " pinskia at gcc dot gnu dot org
@ 2004-01-27 22:49 ` bangerth at dealii dot org
  2004-02-15 12:41 ` gdr at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: bangerth at dealii dot org @ 2004-01-27 22:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-01-27 22:49 -------
This is target dependent (and Andrew correctly already changed the 
component). It doesn't show up on x86 linux. 
 
W. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[3.3 Regression] Assignement|[3.3 Regression] Assignment
                   |of an int to an int of      |of an int to an int of
                   |different size in a struct  |different size in a struct
                   |gives ICE                   |gives ICE


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


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

* [Bug target/13889] [3.3 Regression] Assignment of an int to an int of different size in a struct gives ICE
  2004-01-27 21:42 [Bug c/13889] New: Assignement of an int to an int of different size in a struct gives ICE brederlo at informatik dot uni-tuebingen dot de
                   ` (2 preceding siblings ...)
  2004-01-27 22:49 ` [Bug target/13889] [3.3 Regression] Assignment " bangerth at dealii dot org
@ 2004-02-15 12:41 ` gdr at gcc dot gnu dot org
  2004-03-20 23:03 ` cvs-commit at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: gdr at gcc dot gnu dot org @ 2004-02-15 12:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at gcc dot gnu dot org  2004-02-15 12:41 -------
Adjust milestone

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.3.3                       |3.3.4


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


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

* [Bug target/13889] [3.3 Regression] Assignment of an int to an int of different size in a struct gives ICE
  2004-01-27 21:42 [Bug c/13889] New: Assignement of an int to an int of different size in a struct gives ICE brederlo at informatik dot uni-tuebingen dot de
                   ` (3 preceding siblings ...)
  2004-02-15 12:41 ` gdr at gcc dot gnu dot org
@ 2004-03-20 23:03 ` cvs-commit at gcc dot gnu dot org
  2004-03-20 23:19 ` gdr at integrable-solutions dot net
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-20 23:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-20 23:03 -------
Subject: Bug 13889

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	sayle@gcc.gnu.org	2004-03-20 23:03:03

Modified files:
	gcc            : ChangeLog cse.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.c-torture/compile: pr13889.c 

Log message:
	PR target/13889
	* cse.c (fold_rtx): Avoid substituting constants into unary
	convertion operations.
	
	* gcc.c-torture/compile/pr13889.c: New test case.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3235&r2=2.3236
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cse.c.diff?cvsroot=gcc&r1=1.296&r2=1.297
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3622&r2=1.3623
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/pr13889.c.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug target/13889] [3.3 Regression] Assignment of an int to an int of different size in a struct gives ICE
  2004-01-27 21:42 [Bug c/13889] New: Assignement of an int to an int of different size in a struct gives ICE brederlo at informatik dot uni-tuebingen dot de
                   ` (4 preceding siblings ...)
  2004-03-20 23:03 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-20 23:19 ` gdr at integrable-solutions dot net
  2004-03-20 23:41 ` [Bug target/13889] [3.3/3.4 " roger at eyesopen dot com
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: gdr at integrable-solutions dot net @ 2004-03-20 23:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at integrable-solutions dot net  2004-03-20 23:19 -------
Subject: Re:  [3.3 Regression] Assignment of an int to an int of different size in a struct gives ICE

"cvs-commit at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:

| 	PR target/13889
| 	* cse.c (fold_rtx): Avoid substituting constants into unary
| 	convertion operations.

Roger,

  This PR is classified as a 3.3 regression.  Do you think this patch is
appropriate for gcc-3_3-branch?

-- Gaby


-- 


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


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

* [Bug target/13889] [3.3/3.4 Regression] Assignment of an int to an int of different size in a struct gives ICE
  2004-01-27 21:42 [Bug c/13889] New: Assignement of an int to an int of different size in a struct gives ICE brederlo at informatik dot uni-tuebingen dot de
                   ` (5 preceding siblings ...)
  2004-03-20 23:19 ` gdr at integrable-solutions dot net
@ 2004-03-20 23:41 ` roger at eyesopen dot com
  2004-03-21 16:29 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: roger at eyesopen dot com @ 2004-03-20 23:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From roger at eyesopen dot com  2004-03-20 23:41 -------
This was a 3.3/3.4/3.5 regression, but has now been fixed on mainline.
http://gcc.gnu.org/ml/gcc-patches/2004-03/msg01730.html

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |roger at eyesopen dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED
            Summary|[3.3 Regression] Assignment |[3.3/3.4 Regression]
                   |of an int to an int of      |Assignment of an int to an
                   |different size in a struct  |int of different size in a
                   |gives ICE                   |struct gives ICE


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


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

* [Bug target/13889] [3.3/3.4 Regression] Assignment of an int to an int of different size in a struct gives ICE
  2004-01-27 21:42 [Bug c/13889] New: Assignement of an int to an int of different size in a struct gives ICE brederlo at informatik dot uni-tuebingen dot de
                   ` (6 preceding siblings ...)
  2004-03-20 23:41 ` [Bug target/13889] [3.3/3.4 " roger at eyesopen dot com
@ 2004-03-21 16:29 ` cvs-commit at gcc dot gnu dot org
  2004-03-21 20:16 ` mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-21 16:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-21 16:29 -------
Subject: Bug 13889

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	sayle@gcc.gnu.org	2004-03-21 16:29:02

Modified files:
	gcc            : ChangeLog cse.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.c-torture/compile: pr13889.c 

Log message:
	PR target/13889
	* cse.c (fold_rtx): Avoid substituting constants into unary
	conversion operations.
	
	* gcc.c-torture/compile/pr13889.c: New test case.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.945&r2=1.16114.2.946
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cse.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.244.2.4&r2=1.244.2.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.2261.2.367&r2=1.2261.2.368
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/pr13889.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.2.1



-- 


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


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

* [Bug target/13889] [3.3/3.4 Regression] Assignment of an int to an int of different size in a struct gives ICE
  2004-01-27 21:42 [Bug c/13889] New: Assignement of an int to an int of different size in a struct gives ICE brederlo at informatik dot uni-tuebingen dot de
                   ` (7 preceding siblings ...)
  2004-03-21 16:29 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-21 20:16 ` mmitchel at gcc dot gnu dot org
  2004-03-21 23:02 ` cvs-commit at gcc dot gnu dot org
  2004-04-18 18:52 ` [Bug target/13889] [3.3 " gdr at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-03-21 20:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-03-21 20:16 -------
Roger, would you please apply this patch to 3.4 as well?

-- 


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


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

* [Bug target/13889] [3.3/3.4 Regression] Assignment of an int to an int of different size in a struct gives ICE
  2004-01-27 21:42 [Bug c/13889] New: Assignement of an int to an int of different size in a struct gives ICE brederlo at informatik dot uni-tuebingen dot de
                   ` (8 preceding siblings ...)
  2004-03-21 20:16 ` mmitchel at gcc dot gnu dot org
@ 2004-03-21 23:02 ` cvs-commit at gcc dot gnu dot org
  2004-04-18 18:52 ` [Bug target/13889] [3.3 " gdr at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-21 23:02 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-21 23:02 -------
Subject: Bug 13889

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	sayle@gcc.gnu.org	2004-03-21 23:02:00

Modified files:
	gcc            : ChangeLog cse.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.c-torture/compile: pr13889.c 

Log message:
	PR target/13889
	* cse.c (fold_rtx): Avoid substituting constants into unary
	conversion operations.
	
	* gcc.c-torture/compile/pr13889.c: New test case.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.357&r2=2.2326.2.358
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cse.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.278.4.4&r2=1.278.4.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.154&r2=1.3389.2.155
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/pr13889.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.4.1



-- 


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


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

* [Bug target/13889] [3.3 Regression] Assignment of an int to an int of different size in a struct gives ICE
  2004-01-27 21:42 [Bug c/13889] New: Assignement of an int to an int of different size in a struct gives ICE brederlo at informatik dot uni-tuebingen dot de
                   ` (9 preceding siblings ...)
  2004-03-21 23:02 ` cvs-commit at gcc dot gnu dot org
@ 2004-04-18 18:52 ` gdr at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: gdr at gcc dot gnu dot org @ 2004-04-18 18:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at gcc dot gnu dot org  2004-04-18 18:45 -------
The audit trail indicates that this PR has been fixed
n 3.3.3, 3.4.0 and 3.5.0.  So closing.

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


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


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

end of thread, other threads:[~2004-04-18 18:45 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-27 21:42 [Bug c/13889] New: Assignement of an int to an int of different size in a struct gives ICE brederlo at informatik dot uni-tuebingen dot de
2004-01-27 21:44 ` [Bug c/13889] " brederlo at informatik dot uni-tuebingen dot de
2004-01-27 21:51 ` [Bug target/13889] [3.3 Regression] " pinskia at gcc dot gnu dot org
2004-01-27 22:49 ` [Bug target/13889] [3.3 Regression] Assignment " bangerth at dealii dot org
2004-02-15 12:41 ` gdr at gcc dot gnu dot org
2004-03-20 23:03 ` cvs-commit at gcc dot gnu dot org
2004-03-20 23:19 ` gdr at integrable-solutions dot net
2004-03-20 23:41 ` [Bug target/13889] [3.3/3.4 " roger at eyesopen dot com
2004-03-21 16:29 ` cvs-commit at gcc dot gnu dot org
2004-03-21 20:16 ` mmitchel at gcc dot gnu dot org
2004-03-21 23:02 ` cvs-commit at gcc dot gnu dot org
2004-04-18 18:52 ` [Bug target/13889] [3.3 " gdr 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).