mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-26 12:23:59 +08:00
re PR debug/14492 (loc_descriptor_from_tree, in dwarf2out.c:9031)
PR c/14492 * dwarf2out.c (loc_descriptor_from_tree): Robustify. PR c/14492 * gcc.dg/debug/crash1.c: New test. From-SVN: r86461
This commit is contained in:
parent
a9b5a054c9
commit
c3f216e234
@ -1,3 +1,8 @@
|
||||
2004-08-23 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c/14492
|
||||
* dwarf2out.c (loc_descriptor_from_tree): Robustify.
|
||||
|
||||
2004-08-23 Diego Novillo <dnovillo@redhat.com>
|
||||
|
||||
* cfg.c (check_bb_profile): Fix typos.
|
||||
|
@ -9244,9 +9244,15 @@ loc_descriptor_from_tree_1 (tree loc, int want_address)
|
||||
>= (unsigned int) LAST_AND_UNUSED_TREE_CODE)
|
||||
return 0;
|
||||
|
||||
#ifdef ENABLE_CHECKING
|
||||
/* Otherwise this is a generic code; we should just lists all of
|
||||
these explicitly. Aborting means we forgot one. */
|
||||
abort ();
|
||||
#else
|
||||
/* In a release build, we want to degrade gracefully: better to
|
||||
generate incomplete debugging information than to crash. */
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Show if we can't fill the request for an address. */
|
||||
|
@ -1,3 +1,8 @@
|
||||
2004-08-23 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c/14492
|
||||
* gcc.dg/debug/crash1.c: New test.
|
||||
|
||||
2004-08-23 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c/16180
|
||||
|
8
gcc/testsuite/gcc.dg/debug/crash1.c
Normal file
8
gcc/testsuite/gcc.dg/debug/crash1.c
Normal file
@ -0,0 +1,8 @@
|
||||
/* PR c/14492 */
|
||||
/* { dg-options "" } */
|
||||
|
||||
int main() {
|
||||
double d = 1.0;
|
||||
char x[(int) d];
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user