[Bug middle-end/14310] [tree-ssa] nonlocal goto savearea mode != STACK_SAVEAREA_MODE

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Feb 26 22:13:00 GMT 2004


------- 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



More information about the Gcc-bugs mailing list