public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/14289] New: ICE in a register array
@ 2004-02-25 11:04 meccoli at nergal dot it
  2004-02-25 11:09 ` [Bug c/14289] " meccoli at nergal dot it
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: meccoli at nergal dot it @ 2004-02-25 11:04 UTC (permalink / raw)
  To: gcc-bugs

should it be a compilation error???

COMMAND:
gcc -S -O0 -save-temps pippo.c

OUTPUT:
pippo.c: In function `Nase':
pippo.c:5: warning: address of register variable `a' requested
pippo.c:5: internal compiler error: Segmentation fault

PREPROCESSED FILE:
# 1 "pippo.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "pippo.c"
register int a[2] asm("ebx");
void Nase(void)
{
        int i=6;
        a[i]=5;
}

-- 
           Summary: ICE in a register array
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: meccoli at nergal dot it
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: linux 2.4  on i386
GCC target triplet: linux 2.4 on i386


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


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

* [Bug c/14289] ICE in a register array
  2004-02-25 11:04 [Bug c/14289] New: ICE in a register array meccoli at nergal dot it
@ 2004-02-25 11:09 ` meccoli at nergal dot it
  2004-02-25 15:35 ` [Bug middle-end/14289] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: meccoli at nergal dot it @ 2004-02-25 11:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From meccoli at nergal dot it  2004-02-25 11:09 -------
Created an attachment (id=5795)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5795&action=view)
preprocessed file


-- 


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


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

* [Bug middle-end/14289] [3.3/3.4/3.5 Regression] ICE in a register array
  2004-02-25 11:04 [Bug c/14289] New: ICE in a register array meccoli at nergal dot it
  2004-02-25 11:09 ` [Bug c/14289] " meccoli at nergal dot it
@ 2004-02-25 15:35 ` pinskia at gcc dot gnu dot org
  2004-02-25 16:35 ` falk at debian dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-25 15:35 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-02-25 15:35 -------
Confirmed, a regression from 2.95.3.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|c                           |middle-end
     Ever Confirmed|                            |1
           Keywords|                            |ice-on-valid-code
      Known to fail|                            |3.0.4 3.3.1 3.4.0 3.5.0
      Known to work|                            |2.95.3
   Last reconfirmed|0000-00-00 00:00:00         |2004-02-25 15:35:05
               date|                            |
            Summary|ICE in a register array     |[3.3/3.4/3.5 Regression] ICE
                   |                            |in a register array
   Target Milestone|---                         |3.3.4


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


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

* [Bug middle-end/14289] [3.3/3.4/3.5 Regression] ICE in a register array
  2004-02-25 11:04 [Bug c/14289] New: ICE in a register array meccoli at nergal dot it
  2004-02-25 11:09 ` [Bug c/14289] " meccoli at nergal dot it
  2004-02-25 15:35 ` [Bug middle-end/14289] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
@ 2004-02-25 16:35 ` falk at debian dot org
  2004-03-01  0:08 ` mmitchel at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: falk at debian dot org @ 2004-02-25 16:35 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From falk at debian dot org  2004-02-25 16:35 -------
Should this really be valid code? I can't imagine any reasonable semantics for 
it...


-- 


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


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

* [Bug middle-end/14289] [3.3/3.4/3.5 Regression] ICE in a register array
  2004-02-25 11:04 [Bug c/14289] New: ICE in a register array meccoli at nergal dot it
                   ` (2 preceding siblings ...)
  2004-02-25 16:35 ` falk at debian dot org
@ 2004-03-01  0:08 ` mmitchel at gcc dot gnu dot org
  2004-03-08 21:56 ` cvs-commit at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-03-01  0:08 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-03-01 00:08 -------
This code is not valid, despite being accepted by GCC 2.95.3.

While we should certainly issue a better error message, this is not a
showstopper; I have moved the target milestone to 3.4.1.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|ice-on-valid-code           |ice-on-invalid-code
   Target Milestone|3.3.4                       |3.4.1


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


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

* [Bug middle-end/14289] [3.3/3.4/3.5 Regression] ICE in a register array
  2004-02-25 11:04 [Bug c/14289] New: ICE in a register array meccoli at nergal dot it
                   ` (3 preceding siblings ...)
  2004-03-01  0:08 ` mmitchel at gcc dot gnu dot org
@ 2004-03-08 21:56 ` cvs-commit at gcc dot gnu dot org
  2004-03-08 22:02 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-08 21:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-08 21:56 -------
Subject: Bug 14289

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	sayle@gcc.gnu.org	2004-03-08 21:56:37

Modified files:
	gcc            : ChangeLog c-typeck.c function.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg: pr14289-1.c pr14289-2.c pr14289-3.c 

Log message:
	PR middle-end/14289
	* c-typeck.c (c_mark_addressable): A register variable should
	be considered global if its not automatic, i.e. TREE_PUBLIC,
	TREE_STATIC or DECL_EXTERNAL.
	* function.c (put_var_into_stack): Call abort when placing a
	hard register into the stack, if x_parm_reg_stack_loc is NULL.
	
	* gcc.dg/pr14289-1.c: New test case.
	* gcc.dg/pr14289-2.c: Likewise.
	* gcc.dg/pr14289-3.c: Likewise.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3097&r2=2.3098
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gcc&r1=1.282&r2=1.283
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/function.c.diff?cvsroot=gcc&r1=1.501&r2=1.502
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3581&r2=1.3582
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr14289-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr14289-2.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr14289-3.c.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug middle-end/14289] [3.3/3.4/3.5 Regression] ICE in a register array
  2004-02-25 11:04 [Bug c/14289] New: ICE in a register array meccoli at nergal dot it
                   ` (4 preceding siblings ...)
  2004-03-08 21:56 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-08 22:02 ` pinskia at gcc dot gnu dot org
  2004-03-08 22:03 ` [Bug middle-end/14289] [3.3/3.4 " pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-08 22:02 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-08 22:02 -------
*** Bug 14487 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kuba at parasoft dot com dot
                   |                            |pl


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


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

* [Bug middle-end/14289] [3.3/3.4 Regression] ICE in a register array
  2004-02-25 11:04 [Bug c/14289] New: ICE in a register array meccoli at nergal dot it
                   ` (5 preceding siblings ...)
  2004-03-08 22:02 ` pinskia at gcc dot gnu dot org
@ 2004-03-08 22:03 ` pinskia at gcc dot gnu dot org
  2004-03-09 17:44 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-08 22:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-08 22:03 -------
Been fixed on the mainline now.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[3.3/3.4/3.5 Regression] ICE|[3.3/3.4 Regression] ICE in
                   |in a register array         |a register array


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


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

* [Bug middle-end/14289] [3.3/3.4 Regression] ICE in a register array
  2004-02-25 11:04 [Bug c/14289] New: ICE in a register array meccoli at nergal dot it
                   ` (6 preceding siblings ...)
  2004-03-08 22:03 ` [Bug middle-end/14289] [3.3/3.4 " pinskia at gcc dot gnu dot org
@ 2004-03-09 17:44 ` cvs-commit at gcc dot gnu dot org
  2004-03-09 18:43 ` [Bug middle-end/14289] [3.3 " pinskia 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-09 17:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-09 17:44 -------
Subject: Bug 14289

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	sayle@gcc.gnu.org	2004-03-09 17:44:14

Modified files:
	gcc            : ChangeLog c-typeck.c function.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg: pr14289-1.c pr14289-2.c pr14289-3.c 

Log message:
	PR middle-end/14289
	* c-typeck.c (c_mark_addressable): A register variable should
	be considered global if its not automatic, i.e. TREE_PUBLIC,
	TREE_STATIC or DECL_EXTERNAL.
	* function.c (put_var_into_stack): Call abort when placing a
	hard register into the stack, if x_parm_reg_stack_loc is NULL.
	
	* gcc.dg/pr14289-1.c: New test case.
	* gcc.dg/pr14289-2.c: Likewise.
	* gcc.dg/pr14289-3.c: Likewise.

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.317&r2=2.2326.2.318
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.272.2.3&r2=1.272.2.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/function.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.483.4.7&r2=1.483.4.8
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.135&r2=1.3389.2.136
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr14289-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr14289-2.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr14289-3.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1



-- 


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


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

* [Bug middle-end/14289] [3.3 Regression] ICE in a register array
  2004-02-25 11:04 [Bug c/14289] New: ICE in a register array meccoli at nergal dot it
                   ` (7 preceding siblings ...)
  2004-03-09 17:44 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-09 18:43 ` pinskia at gcc dot gnu dot org
  2004-03-10 18:37 ` cvs-commit at gcc dot gnu dot org
  2004-03-10 18:41 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-09 18:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-09 18:43 -------
Fixed in 3.4.0 also.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|3.0.4 3.3.1 3.4.0 3.5.0     |3.0.4 3.3.1
      Known to work|2.95.3                      |2.95.3 3.4.0 3.5.0
            Summary|[3.3/3.4 Regression] ICE in |[3.3 Regression] ICE in a
                   |a register array            |register array
   Target Milestone|3.4.1                       |3.3.4


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


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

* [Bug middle-end/14289] [3.3 Regression] ICE in a register array
  2004-02-25 11:04 [Bug c/14289] New: ICE in a register array meccoli at nergal dot it
                   ` (8 preceding siblings ...)
  2004-03-09 18:43 ` [Bug middle-end/14289] [3.3 " pinskia at gcc dot gnu dot org
@ 2004-03-10 18:37 ` cvs-commit at gcc dot gnu dot org
  2004-03-10 18:41 ` pinskia 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-10 18:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-10 18:37 -------
Subject: Bug 14289

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	sayle@gcc.gnu.org	2004-03-10 18:37:26

Modified files:
	gcc            : ChangeLog c-typeck.c function.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg: pr14289-1.c pr14289-2.c pr14289-3.c 

Log message:
	PR middle-end/14289
	* c-typeck.c (c_mark_addressable): A register variable should
	be considered global if its not automatic, i.e. TREE_PUBLIC,
	TREE_STATIC or DECL_EXTERNAL.
	* function.c (put_var_into_stack): Call abort when placing a
	hard register into the stack, if x_parm_reg_stack_loc is NULL.
	
	* gcc.dg/pr14289-1.c: New test case.
	* gcc.dg/pr14289-2.c: Likewise.
	* gcc.dg/pr14289-3.c: Likewise.

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.929&r2=1.16114.2.930
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.213.2.11&r2=1.213.2.12
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/function.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.389.2.14&r2=1.389.2.15
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.364&r2=1.2261.2.365
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr14289-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.4.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr14289-2.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.4.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr14289-3.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.4.1



-- 


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


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

* [Bug middle-end/14289] [3.3 Regression] ICE in a register array
  2004-02-25 11:04 [Bug c/14289] New: ICE in a register array meccoli at nergal dot it
                   ` (9 preceding siblings ...)
  2004-03-10 18:37 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-10 18:41 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-10 18:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-10 18:41 -------
Fixed for 3.3.4, 3.4.0, and 3.5.0.

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


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


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

end of thread, other threads:[~2004-03-10 18:41 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-25 11:04 [Bug c/14289] New: ICE in a register array meccoli at nergal dot it
2004-02-25 11:09 ` [Bug c/14289] " meccoli at nergal dot it
2004-02-25 15:35 ` [Bug middle-end/14289] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
2004-02-25 16:35 ` falk at debian dot org
2004-03-01  0:08 ` mmitchel at gcc dot gnu dot org
2004-03-08 21:56 ` cvs-commit at gcc dot gnu dot org
2004-03-08 22:02 ` pinskia at gcc dot gnu dot org
2004-03-08 22:03 ` [Bug middle-end/14289] [3.3/3.4 " pinskia at gcc dot gnu dot org
2004-03-09 17:44 ` cvs-commit at gcc dot gnu dot org
2004-03-09 18:43 ` [Bug middle-end/14289] [3.3 " pinskia at gcc dot gnu dot org
2004-03-10 18:37 ` cvs-commit at gcc dot gnu dot org
2004-03-10 18:41 ` 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).