mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-11 22:45:44 +08:00
re PR debug/51695 (NOTE_INSN_VAR_LOCATION notes are sometimes too large)
PR debug/51695 * dwarf2out.c (output_loc_list): For now drop >= 64KB expressions in .debug_loc on the floor. * gcc.dg/pr51695.c: New test. From-SVN: r182886
This commit is contained in:
parent
03a9ba1e28
commit
5dc28f42b4
@ -1,3 +1,9 @@
|
||||
2012-01-04 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR debug/51695
|
||||
* dwarf2out.c (output_loc_list): For now drop >= 64KB expressions
|
||||
in .debug_loc on the floor.
|
||||
|
||||
2012-01-04 Andrew Pinski <apinski@cavium.com>
|
||||
|
||||
* doc/invoke.texi (-march=@var{arch}): Add octeon+ and octeon2.
|
||||
|
@ -8166,6 +8166,13 @@ output_loc_list (dw_loc_list_ref list_head)
|
||||
/* Don't output an entry that starts and ends at the same address. */
|
||||
if (strcmp (curr->begin, curr->end) == 0 && !curr->force)
|
||||
continue;
|
||||
size = size_of_locs (curr->expr);
|
||||
/* If the expression is too large, drop it on the floor. We could
|
||||
perhaps put it into DW_TAG_dwarf_procedure and refer to that
|
||||
in the expression, but >= 64KB expressions for a single value
|
||||
in a single range are unlikely very useful. */
|
||||
if (size > 0xffff)
|
||||
continue;
|
||||
if (!have_multiple_function_sections)
|
||||
{
|
||||
dw2_asm_output_delta (DWARF2_ADDR_SIZE, curr->begin, curr->section,
|
||||
@ -8184,7 +8191,6 @@ output_loc_list (dw_loc_list_ref list_head)
|
||||
"Location list end address (%s)",
|
||||
list_head->ll_symbol);
|
||||
}
|
||||
size = size_of_locs (curr->expr);
|
||||
|
||||
/* Output the block length for this list of location operations. */
|
||||
gcc_assert (size <= 0xffff);
|
||||
|
@ -1,3 +1,8 @@
|
||||
2012-01-04 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR debug/51695
|
||||
* gcc.dg/pr51695.c: New test.
|
||||
|
||||
2012-01-04 Andrew Pinski <apinski@cavium.com>
|
||||
|
||||
* gcc.target/mips/mips64-dsp-ldx1.c: New test.
|
||||
|
52
gcc/testsuite/gcc.dg/pr51695.c
Normal file
52
gcc/testsuite/gcc.dg/pr51695.c
Normal file
@ -0,0 +1,52 @@
|
||||
/* PR debug/51695 */
|
||||
/* { dg-do compile { target { int32plus } } } */
|
||||
/* { dg-options "-O2 -g" } */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
struct { unsigned int t1, t2, t3, t4, t5, t6; } t;
|
||||
int p;
|
||||
struct { double X, Y, Z; } r;
|
||||
} T;
|
||||
typedef struct { T *h; } S;
|
||||
|
||||
static unsigned int v = 0x12345678;
|
||||
|
||||
int
|
||||
foo (void)
|
||||
{
|
||||
v = (v & 0x80000000) ? ((v << 1) ^ 0xa398655d) : (v << 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
double
|
||||
bar (void)
|
||||
{
|
||||
unsigned int o;
|
||||
v = (v & 0x80000000) ? ((v << 1) ^ 0xa398655d) : (v << 1);
|
||||
o = v & 0xffff;
|
||||
return (double) o / 32768.0;
|
||||
}
|
||||
|
||||
int
|
||||
baz (void)
|
||||
{
|
||||
foo ();
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
test (S *x)
|
||||
{
|
||||
T *t = x->h;
|
||||
t->t.t1 = foo ();
|
||||
t->t.t2 = foo ();
|
||||
t->t.t3 = foo ();
|
||||
t->t.t4 = foo ();
|
||||
t->t.t5 = foo ();
|
||||
t->t.t6 = foo ();
|
||||
t->p = baz ();
|
||||
t->r.X = bar ();
|
||||
t->r.Y = bar ();
|
||||
t->r.Z = bar ();
|
||||
}
|
Loading…
Reference in New Issue
Block a user