public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: jb@as220.org To: gcc-gnats@gcc.gnu.org Cc: ebotcazou@libertysurf.fr Subject: optimization/9888: -m(arch|cpu) -k6(-2)? -Os causes ICE compiling gcc/reload.c Date: Fri, 28 Feb 2003 17:46:00 -0000 [thread overview] Message-ID: <20030228174028.26187.qmail@sources.redhat.com> (raw) >Number: 9888 >Category: optimization >Synopsis: -m(arch|cpu) -k6(-2)? -Os causes ICE compiling gcc/reload.c >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Fri Feb 28 17:46:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Jim Bray >Release: 3.2.2 >Organization: >Environment: not significant >Description: I have attached code, hopefully suitable for a testsuite item, derived from gcc/gcc/find-reloads.c. Compiling this with -m<any k6 option> -Os causes an ICE. A loop insn is generated (compiling with say -mi586 generates a jump insn instead), the target of which is outside of the +/-127 range of the loop. >How-To-Repeat: run the attached file with -m<any k6 option> -Os >Fix: >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: text/plain; name="find-reloads-test.c" Content-Disposition: inline; filename="find-reloads-test.c" enum reload_type { RELOAD_FOR_INPUT, RELOAD_FOR_OUTPUT, RELOAD_FOR_INSN, RELOAD_FOR_INPUT_ADDRESS, RELOAD_FOR_INPADDR_ADDRESS, RELOAD_FOR_OUTPUT_ADDRESS, RELOAD_FOR_OUTADDR_ADDRESS, RELOAD_FOR_OPERAND_ADDRESS, RELOAD_FOR_OPADDR_ADDR, RELOAD_OTHER, RELOAD_FOR_OTHER_ADDRESS }; #define FOOSIZE 3 /* *My results, varying with FOOSIZE: * 30: asm error "value of ..fff77 too large: * 3 to 29: ....ff7d... * 1 to 2: no error */ struct reload { int foo[FOOSIZE]; int opnum; enum reload_type when_needed; unsigned int optional:1; unsigned int secondary_p:1; }; struct reload rld[1]; int n_reloads=1; int find_reloads (void); int find_reloads () { int i; enum reload_type operand_type[1]; enum reload_type address_type[1]; int operand_reloadnum[1]; int goal_alternative_matches[1]; int retval = 0; for (i = 0; i < n_reloads; i++) { if (rld[i].secondary_p && rld[i].when_needed == operand_type[rld[i].opnum]) rld[i].when_needed = address_type[rld[i].opnum]; if ((rld[i].when_needed == RELOAD_FOR_INPUT_ADDRESS || rld[i].when_needed == RELOAD_FOR_OUTPUT_ADDRESS || rld[i].when_needed == RELOAD_FOR_INPADDR_ADDRESS || rld[i].when_needed == RELOAD_FOR_OUTADDR_ADDRESS) && (operand_reloadnum[rld[i].opnum] < 0 || rld[operand_reloadnum[rld[i].opnum]].optional)) { if (rld[i].when_needed == RELOAD_FOR_INPADDR_ADDRESS || rld[i].when_needed == RELOAD_FOR_OUTADDR_ADDRESS) rld[i].when_needed = RELOAD_FOR_OPADDR_ADDR; else rld[i].when_needed = RELOAD_FOR_OPERAND_ADDRESS; } if ((rld[i].when_needed == RELOAD_FOR_INPUT_ADDRESS || rld[i].when_needed == RELOAD_FOR_INPADDR_ADDRESS) && operand_reloadnum[rld[i].opnum] >= 0 && (rld[operand_reloadnum[rld[i].opnum]].when_needed == RELOAD_OTHER)) rld[i].when_needed = RELOAD_FOR_OTHER_ADDRESS; if (goal_alternative_matches[rld[i].opnum] >= 0) rld[i].opnum = goal_alternative_matches[rld[i].opnum]; } return retval; }
reply other threads:[~2003-02-28 17:46 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20030228174028.26187.qmail@sources.redhat.com \ --to=jb@as220.org \ --cc=ebotcazou@libertysurf.fr \ --cc=gcc-gnats@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).