public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/14310] New: nonlocal goto savearea mode != STACK_SAVEAREA_MODE
@ 2004-02-26 22:09 dje at gcc dot gnu dot org
  2004-02-26 22:13 ` [Bug middle-end/14310] [tree-ssa] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: dje at gcc dot gnu dot org @ 2004-02-26 22:09 UTC (permalink / raw)
  To: gcc-bugs

explow.c:update_nonlocal_goto_save_area does not construct an object with the
mode specified by STACK_SAVEAREA_MODE macro.  This causes
explow.c:emit_stack_save() to ICE when the modes do not match.

Testsuite failures:
gcc.c-torture/execute/920428-2.c
gcc.c-torture/execute/920501-7.c
gcc.c-torture/execute/comp-goto-2.c
gcc.c-torture/execute/nestfunc-5.c
gcc.c-torture/execute/nestfunc-6.c

-- 
           Summary: nonlocal goto savearea mode != STACK_SAVEAREA_MODE
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dje at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-*-*
  GCC host triplet: powerpc-*-*
GCC target triplet: powerpc-*-*


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


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

* [Bug middle-end/14310] [tree-ssa] nonlocal goto savearea mode != STACK_SAVEAREA_MODE
  2004-02-26 22:09 [Bug middle-end/14310] New: nonlocal goto savearea mode != STACK_SAVEAREA_MODE dje at gcc dot gnu dot org
@ 2004-02-26 22:13 ` pinskia at gcc dot gnu dot org
  2004-02-27  9:03 ` rth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-26 22:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-02-26 22:13 -------
Confirmed.
[zhivago2:gcc/objdir_c/gcc] pinskia% ./cc1 ../../gcc/testsuite/gcc.c-torture/execute/nestfunc-5.c -v
ignoring nonexistent directory "/Users/pinskia/gcc-tree-ssa-Conly/lib/gcc/powerpc-apple-
darwin7.2.0/3.5-tree-ssa/../../../../powerpc-apple-darwin7.2.0/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /Users/pinskia/gcc-tree-ssa-Conly/include
 /Users/pinskia/gcc-tree-ssa-Conly/lib/gcc/powerpc-apple-darwin7.2.0/3.5-tree-ssa/include
 /usr/include
End of search list.
 recursive
 do_goto

../../gcc/testsuite/gcc.c-torture/execute/nestfunc-5.c:6: internal compiler error: in emit_stack_save, at 
explow.c:954
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

Here is the backtrace:
#1  0x001f3964 in emit_stack_save (save_level=SAVE_NONLOCAL, psave=0xbfffec4c, after=0x0) at /
Users/pinskia/src/gcc-tree-ssa/gcc/gcc/explow.c:954
#2  0x001f3c68 in update_nonlocal_goto_save_area () at /Users/pinskia/src/gcc-tree-ssa/gcc/gcc/
explow.c:1061
#3  0x0018ebc4 in expand_function_start (subr=0x410f9d80, parms_have_cleanups=0) at /Users/
pinskia/src/gcc-tree-ssa/gcc/gcc/function.c:6455
During symbol reading, struct/union type gets multiply defined: union tree_node.
During symbol reading, struct/union type gets multiply defined: struct rtx_def.
During symbol reading, struct/union type gets multiply defined: struct rtvec_def.
During symbol reading, struct/union type gets multiply defined: union tree_node.
During symbol reading, struct/union type gets multiply defined: struct loop.
During symbol reading, struct/union type gets multiply defined: union tree_ann_d.
During symbol reading, struct/union type gets multiply defined: struct dump_info.
#4  0x003775c8 in tree_rest_of_compilation (fndecl=0x410f9d80, nested_p=false) at /Users/pinskia/
src/gcc-tree-ssa/gcc/gcc/tree-optimize.c:536
#5  0x0002f7d0 in c_expand_body_1 (fndecl=0x410f9d80, nested_p=0) at /Users/pinskia/src/gcc-
tree-ssa/gcc/gcc/c-decl.c:6204
#6  0x0002fb54 in c_expand_body (fndecl=0x410f9d80) at /Users/pinskia/src/gcc-tree-ssa/gcc/gcc/
c-decl.c:6236
#7  0x0036886c in cgraph_expand_function (node=0x410fb280) at /Users/pinskia/src/gcc-tree-ssa/
gcc/gcc/cgraphunit.c:789
#8  0x00366f7c in cgraph_assemble_pending_functions () at /Users/pinskia/src/gcc-tree-ssa/gcc/gcc/
cgraphunit.c:294
#9  0x00367184 in cgraph_finalize_function (decl=0x410f9d80, nested=false) at /Users/pinskia/src/
gcc-tree-ssa/gcc/gcc/cgraphunit.c:375
#10 0x0002eb8c in c_finalize (fndecl=0x410f9d80) at /Users/pinskia/src/gcc-tree-ssa/gcc/gcc/c-
decl.c:6034
#11 0x0002f5bc in finish_function () at /Users/pinskia/src/gcc-tree-ssa/gcc/gcc/c-decl.c:6148
#12 0x00003d90 in yyparse () at c-parse.y:386
#13 0x0000ef70 in c_parse_file () at c-parse.y:3053
#14 0x0008d71c in c_common_parse_file (set_yydebug=0) at /Users/pinskia/src/gcc-tree-ssa/gcc/
gcc/c-opts.c:1234
#15 0x0011250c in compile_file () at /Users/pinskia/src/gcc-tree-ssa/gcc/gcc/toplev.c:1865
#16 0x001184b8 in do_compile () at /Users/pinskia/src/gcc-tree-ssa/gcc/gcc/toplev.c:4566
#17 0x0011859c in toplev_main (argc=2, argv=0xbffffc40) at /Users/pinskia/src/gcc-tree-ssa/gcc/
gcc/toplev.c:4606
#18 0x000baf44 in main (argc=2, argv=0xbffffc40) at /Users/pinskia/src/gcc-tree-ssa/gcc/gcc/
main.c:35


The problem is that update_nonlocal_goto_save_area does not really enforce what it says it should:
  /* The nonlocal_goto_save_area object is an array of N pointers.  The
     first one is used for the frame pointer save; the rest are sized by
     STACK_SAVEAREA_MODE.  Create a reference to array index 1, the first
     of the stack save area slots.  */
  t_save = build (ARRAY_REF, ptr_type_node, cfun->nonlocal_goto_save_area,
                  integer_one_node);

Note on PPC, STACK_SAVEAREA_MODE is not the default of Pmode.

Richard, can you look into this.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rth at gcc dot gnu dot org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
      Known to fail|                            |tree-ssa
      Known to work|                            |3.4.0
   Last reconfirmed|0000-00-00 00:00:00         |2004-02-26 22:13:41
               date|                            |
            Summary|nonlocal goto savearea mode |[tree-ssa] nonlocal goto
                   |!= STACK_SAVEAREA_MODE      |savearea mode !=
                   |                            |STACK_SAVEAREA_MODE
   Target Milestone|---                         |tree-ssa


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


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

* [Bug middle-end/14310] [tree-ssa] nonlocal goto savearea mode != STACK_SAVEAREA_MODE
  2004-02-26 22:09 [Bug middle-end/14310] New: nonlocal goto savearea mode != STACK_SAVEAREA_MODE dje at gcc dot gnu dot org
  2004-02-26 22:13 ` [Bug middle-end/14310] [tree-ssa] " pinskia at gcc dot gnu dot org
@ 2004-02-27  9:03 ` rth at gcc dot gnu dot org
  2004-02-27  9:15 ` rth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-02-27  9:03 UTC (permalink / raw)
  To: gcc-bugs



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


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


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

* [Bug middle-end/14310] [tree-ssa] nonlocal goto savearea mode != STACK_SAVEAREA_MODE
  2004-02-26 22:09 [Bug middle-end/14310] New: nonlocal goto savearea mode != STACK_SAVEAREA_MODE dje at gcc dot gnu dot org
  2004-02-26 22:13 ` [Bug middle-end/14310] [tree-ssa] " pinskia at gcc dot gnu dot org
  2004-02-27  9:03 ` rth at gcc dot gnu dot org
@ 2004-02-27  9:15 ` rth at gcc dot gnu dot org
  2004-02-27 15:38 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-02-27  9:15 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |WAITING
           Keywords|                            |patch


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


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

* [Bug middle-end/14310] [tree-ssa] nonlocal goto savearea mode != STACK_SAVEAREA_MODE
  2004-02-26 22:09 [Bug middle-end/14310] New: nonlocal goto savearea mode != STACK_SAVEAREA_MODE dje at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-02-27  9:15 ` rth at gcc dot gnu dot org
@ 2004-02-27 15:38 ` pinskia at gcc dot gnu dot org
  2004-02-27 23:14 ` cvs-commit at gcc dot gnu dot org
  2004-02-27 23:53 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-27 15:38 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-02-27 15:38 -------
The patch at least solves "gcc.c-torture/execute/nestfunc-5.c", did not try the rest though 
or a full bootstrap yet.

-- 


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


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

* [Bug middle-end/14310] [tree-ssa] nonlocal goto savearea mode != STACK_SAVEAREA_MODE
  2004-02-26 22:09 [Bug middle-end/14310] New: nonlocal goto savearea mode != STACK_SAVEAREA_MODE dje at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-02-27 15:38 ` pinskia at gcc dot gnu dot org
@ 2004-02-27 23:14 ` cvs-commit at gcc dot gnu dot org
  2004-02-27 23:53 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-02-27 23:14 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-02-27 23:14 -------
Subject: Bug 14310

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	tree-ssa-20020619-branch
Changes by:	dje@gcc.gnu.org	2004-02-27 23:14:46

Modified files:
	gcc            : ChangeLog.tree-ssa explow.c 

Log message:
	2004-02-27  Richard Henderson  <rth@redhat.com>
	
	PR middle-end/14310
	* explow.c (emit_stack_save): Remove savearea mode check.

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.1235&r2=1.1.2.1236
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/explow.c.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.94.2.22&r2=1.94.2.23



-- 


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


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

* [Bug middle-end/14310] [tree-ssa] nonlocal goto savearea mode != STACK_SAVEAREA_MODE
  2004-02-26 22:09 [Bug middle-end/14310] New: nonlocal goto savearea mode != STACK_SAVEAREA_MODE dje at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2004-02-27 23:14 ` cvs-commit at gcc dot gnu dot org
@ 2004-02-27 23:53 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-27 23:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-02-27 23:53 -------
Closing as fixed as this patch fixes those failures and the patch was applied.

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


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


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

end of thread, other threads:[~2004-02-27 23:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-26 22:09 [Bug middle-end/14310] New: nonlocal goto savearea mode != STACK_SAVEAREA_MODE dje at gcc dot gnu dot org
2004-02-26 22:13 ` [Bug middle-end/14310] [tree-ssa] " pinskia at gcc dot gnu dot org
2004-02-27  9:03 ` rth at gcc dot gnu dot org
2004-02-27  9:15 ` rth at gcc dot gnu dot org
2004-02-27 15:38 ` pinskia at gcc dot gnu dot org
2004-02-27 23:14 ` cvs-commit at gcc dot gnu dot org
2004-02-27 23:53 ` 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).