i386: Skip DF_REF_INSN if DF_REF_INSN_INFO is false
We should check DF_REF_INSN_INFO before accessing DF_REF_INSN. gcc/ PR target/82673 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Skip DF_REF_INSN if DF_REF_INSN_INFO is false. gcc/testsuite/ PR target/82673 * gcc.target/i386/pr82673.c: New test. From-SVN: r254013
This commit is contained in:
parent
df41dbaf7e
commit
66f4014d4b
4 changed files with 28 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2017-10-23 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR target/82673
|
||||
* config/i386/i386.c (ix86_finalize_stack_frame_flags): Skip
|
||||
DF_REF_INSN if DF_REF_INSN_INFO is false.
|
||||
|
||||
2017-10-23 Jan Hubicka <hubicka@ucw.cz>
|
||||
|
||||
* i386.c (dimode_scalar_chain::compute_convert_gain): Use
|
||||
|
|
|
@ -12692,10 +12692,13 @@ ix86_finalize_stack_frame_flags (void)
|
|||
for (ref = DF_REG_USE_CHAIN (HARD_FRAME_POINTER_REGNUM);
|
||||
ref; ref = next)
|
||||
{
|
||||
rtx_insn *insn = DF_REF_INSN (ref);
|
||||
next = DF_REF_NEXT_REG (ref);
|
||||
if (!DF_REF_INSN_INFO (ref))
|
||||
continue;
|
||||
|
||||
/* Make sure the next ref is for a different instruction,
|
||||
so that we're not affected by the rescan. */
|
||||
next = DF_REF_NEXT_REG (ref);
|
||||
rtx_insn *insn = DF_REF_INSN (ref);
|
||||
while (next && DF_REF_INSN (next) == insn)
|
||||
next = DF_REF_NEXT_REG (next);
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2017-10-23 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR target/82673
|
||||
* gcc.target/i386/pr82673.c: New test.
|
||||
|
||||
2017-10-23 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* lib/scanasm.exp (dg-function-on-line): Accept optional column info.
|
||||
|
|
12
gcc/testsuite/gcc.target/i386/pr82673.c
Normal file
12
gcc/testsuite/gcc.target/i386/pr82673.c
Normal file
|
@ -0,0 +1,12 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O0 -fno-omit-frame-pointer -fvar-tracking-assignments" } */
|
||||
|
||||
register long *B asm ("ebp");
|
||||
|
||||
long y = 20;
|
||||
|
||||
void
|
||||
bar (void) /* { dg-error "frame pointer required, but reserved" } */
|
||||
{
|
||||
B = &y;
|
||||
} /* { dg-error "bp cannot be used in asm here" } */
|
Loading…
Add table
Reference in a new issue