public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "gvvn1200 at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/53461] New: Incorrect handling of CASE_VECTOR_PC_RELATIVE in config/m68k.md Date: Wed, 23 May 2012 17:16:00 -0000 [thread overview] Message-ID: <bug-53461-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53461 Bug #: 53461 Summary: Incorrect handling of CASE_VECTOR_PC_RELATIVE in config/m68k.md Classification: Unclassified Product: gcc Version: 4.6.3 Status: UNCONFIRMED Severity: major Priority: P3 Component: target AssignedTo: unassigned@gcc.gnu.org ReportedBy: gvvn1200@gmail.com I have been trying to port a recent gcc version to m68k-next-nextstep3 target and encountered an ICE in the stage1 compiler. With help of the m68k debian ports community I was able to identify a bug in config/m68k/m68k.md. This bug exists in all reasonably recent versions of gcc but not in gcc-3.2 and gcc-3.4. The m68k.md file contains the following conditional statement: #ifdef CASE_VECTOR_PC_RELATIVE operands[0] = gen_rtx_PLUS (SImode, pc_rtx, gen_rtx_SIGN_EXTEND (SImode, operands[0])); #endif If the target configuration files undefine CASE_VECTOR_PC_RELATIVE, the defaults.h header redefines CASE_VECTOR_PC_RELATIVE as follows: /* Assume that case vectors are not pc-relative. */ #ifndef CASE_VECTOR_PC_RELATIVE #define CASE_VECTOR_PC_RELATIVE 0 #endif The defaults.h header file is included after the target configuration files and thus overrides the CASE_VECTOR_PC_RELATIVE. The conditional statement in config/m68k/m68k.md is therefore always satisfied even if the target configuration undefines CASE_VECTOR_PC_RELATIVE. I was able to resolve the issue with the following change to config/m68k/m68k.md: #if CASE_VECTOR_PC_RELATIVE != 0 operands[0] = gen_rtx_PLUS (SImode, pc_rtx, gen_rtx_SIGN_EXTEND (SImode, operands[0])); #endif t-rexky
next reply other threads:[~2012-05-23 16:49 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-05-23 17:16 gvvn1200 at gmail dot com [this message] 2012-05-26 15:09 ` [Bug target/53461] " gvvn1200 at gmail dot com 2012-06-04 13:13 ` schwab at gcc dot gnu.org 2012-06-04 13:14 ` schwab@linux-m68k.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-53461-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).