From mboxrd@z Thu Jan 1 00:00:00 1970 From: pauli@lineo.com To: gcc-gnats@gcc.gnu.org Subject: other/2930: Failure to compile/link when check_stack rule defined Date: Thu, 24 May 2001 16:16:00 -0000 Message-id: <20010524230712.11768.qmail@sourceware.cygnus.com> X-SW-Source: 2001-05/msg00733.html List-Id: >Number: 2930 >Category: other >Synopsis: Failure to compile/link when check_stack rule defined >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Thu May 24 16:16:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Paul Dale >Release: building: gcc version 2.95.3 20010315 (release) >Organization: >Environment: Linux skaro 2.2.16-22 #1 Tue Aug 22 16:49:06 EDT 2000 i686 unknown Building a cross compiler for m68k-elf >Description: I added a check_stack rule to the m68k machine description file (without an MMU, the inbuilt stack check code doesn't work). When I attempted to build gcc I received the folloring error message: [...] gcc -c -DCROSS_COMPILE -DIN_GCC -g -O2 -DHAVE_CONFIG_H \ -I. -I../../gcc-2.95.3/gcc -I../../gcc-2.95.3/gcc/config \ -I../../gcc-2.95.3/gcc/../include ../../gcc-2.95.3/gcc/explow.c ../../gcc-2.95.3/gcc/explow.c: In function `probe_stack_range': ../../gcc-2.95.3/gcc/explow.c:1372: warning: passing arg 1 of `force_operand' makes pointer from integer without a cast ../../gcc-2.95.3/gcc/explow.c:1376: `last_address' undeclared (first use in this function) ../../gcc-2.95.3/gcc/explow.c:1376: (Each undeclared identifier is reported only once ../../gcc-2.95.3/gcc/explow.c:1376: for each function it appears in.) Fixing this (change last_addr to last_address in this function) and building again from scratch produced a link error much later in the build: [...] gcc -DCROSS_COMPILE -DIN_GCC -g -O2 -DHAVE_CONFIG_H -o cc1 toplev.o version.o tree.o print-tree.o \ stor-layout.o fold-const.o function.o stmt.o except.o expr.o calls.o expmed.o explow.o optabs.o \ intl.o varasm.o rtl.o print-rtl.o rtlanal.o emit-rtl.o genrtl.o real.o dbxout.o sdbout.o \ dwarfout.o dwarf2out.o xcoffout.o bitmap.o alias.o gcse.o integrate.o jump.o cse.o loop.o \ unroll.o flow.o stupid.o combine.o varray.o regclass.o regmove.o local-alloc.o global.o \ reload.o reload1.o caller-save.o insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \ insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o lcm.o profile.o insn-attrtab.o \ m68k.o getpwd.o convert.o mbchar.o dyn-string.o splay-tree.o graph.o sbitmap.o resource.o hash.o \ c-parse.o c-lang.o c-lex.o c-pragma.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o \ obstack.o ../libiberty/libiberty.a explow.o: In function `probe_stack_range': /home/gcc/build-gcc/gcc/../../gcc-2.95.3/gcc/explow.c:1369: undefined reference to `gen_rtx_STACK_GROW_OP' It seems the documented check_stack rule doesn't quite function anymore. I've tried several variations on the check_stack rule and all exhibited this problem. >How-To-Repeat: I added the following rule to the m68k.md file: (define_insn "check_stack" [(set (cc0) (match_operand:SI 0 "general_operand" "d"))] "" "nop") this caused gcc not to compile. >Fix: >Release-Note: >Audit-Trail: >Unformatted: