Bug 39499 - reload1.c:set_label_offsets assumes that all labels reachable from indirect jumps are assumed to be at their "initial elimination offsets"
Summary: reload1.c:set_label_offsets assumes that all labels reachable from indirect j...
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.4.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: wrong-code
Depends on: 38609
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-18 23:41 UTC by Hans-Peter Nilsson
Modified: 2009-03-18 23:42 UTC (History)
1 user (show)

See Also:
Host: x86_64-unknown-linux-gnu
Target: cris-axis-elf
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hans-Peter Nilsson 2009-03-18 23:41:46 UTC
+++ This bug was initially created as a clone of Bug #38609 +++

See PR38609 comment 12.
I noticed that reload1.c:set_label_offsets assumes that all labels reachable from indirect jumps are assumed to be at their "initial elimination offsets", which fails if there's an alloca call or similar adjustment before the're reached.  For *some* targets, gcc.c-torture/execute/built-in-setjmp.c expose this bug, but one or more separate test-cases is called for to expose it for the wider audience: main is not useful wherein to test sp vs. fp misadjustments, and the test-case should not need for run-time sp realignments, else for many targets, fp->sp elimination will not happen.  Also, computed gotos can be probably also be used to expose the bug, rather than __builtin_setjmp/longjmp.  This code deserves to be fixed correctly, but considering the current development stage and the limited use of this code, I'll do like other targets and bail out for cris*-*-* by forcing a frame-pointer.  Therefore this clone.
Comment 1 Hans-Peter Nilsson 2009-03-18 23:42:45 UTC
Whoops.  Summary improved.