From: Jakub Jelinek Date: Tue, 9 Mar 2010 18:48:43 +0000 (+0100) Subject: re PR debug/43290 (ICE in dwarf2out_frame_debug_expr) X-Git-Tag: releases/gcc-4.5.0~444 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4398467a10ce7c25357bf3dce287b2dd4c59302d;p=thirdparty%2Fgcc.git re PR debug/43290 (ICE in dwarf2out_frame_debug_expr) PR debug/43290 * config/i386/i386.c (ix86_get_drap_rtx): Don't set RTX_FRAME_RELATED_P. * g++.dg/eh/unwind2.C: New test. From-SVN: r157313 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cba20314536f..20a1e8735a79 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-03-09 Jakub Jelinek + + PR debug/43290 + * config/i386/i386.c (ix86_get_drap_rtx): Don't set + RTX_FRAME_RELATED_P. + 2010-03-09 Jie Zhang * config/arm/arm.md (thumb_mulsi3_v6): Remove trailing diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 3a3b2ac943b7..ab242a63da60 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -8319,7 +8319,7 @@ ix86_get_drap_rtx (void) unsigned int regno = find_drap_reg (); rtx drap_vreg; rtx arg_ptr; - rtx seq, insn; + rtx seq; arg_ptr = gen_rtx_REG (Pmode, regno); crtl->drap_reg = arg_ptr; @@ -8328,9 +8328,8 @@ ix86_get_drap_rtx (void) drap_vreg = copy_to_reg (arg_ptr); seq = get_insns (); end_sequence (); - - insn = emit_insn_before (seq, NEXT_INSN (entry_of_function ())); - RTX_FRAME_RELATED_P (insn) = 1; + + emit_insn_before (seq, NEXT_INSN (entry_of_function ())); return drap_vreg; } else diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b9ade14bcae3..a874977e3b95 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-03-09 Jakub Jelinek + + PR debug/43290 + * g++.dg/eh/unwind2.C: New test. + 2010-03-05 Sebastian Pop Reza Yazdani diff --git a/gcc/testsuite/g++.dg/eh/unwind2.C b/gcc/testsuite/g++.dg/eh/unwind2.C new file mode 100644 index 000000000000..d6181c8c04b5 --- /dev/null +++ b/gcc/testsuite/g++.dg/eh/unwind2.C @@ -0,0 +1,94 @@ +// PR debug/43290 +// { dg-do compile } +// { dg-options "-O2" } +// { dg-options "-O3 -mavx -fPIC -mtune=core2" { target { { i?86-*-* x86_64-*-* } && { ilp32 && fpic } } } } + +namespace std +{ + template struct char_traits; +} +typedef struct { union { char __wchb[4]; }; } mbstate_t; +namespace std +{ + template struct fpos + { + long long _M_off; + _StateT _M_state; + fpos (long long):_M_off (), _M_state () { } + _StateT state () { return _M_state; } + }; + typedef fpos streampos; +} +namespace std +{ + template <> struct char_traits + { + typedef streampos pos_type; + typedef long long off_type; + typedef mbstate_t state_type; + }; +} +struct pthread_mutex_t; +namespace +{ + enum _Ios_Openmode { _S_in = 3, _S_out }; + enum _Ios_Seekdir { _S_beg }; + struct ios_base + { + typedef _Ios_Openmode openmode; + static const openmode in = _S_in; + static const openmode out = _S_out; + typedef _Ios_Seekdir seekdir; + static const seekdir beg = _S_beg; + }; + template < typename _CharT, typename > struct basic_streambuf + { + typedef _CharT char_type; + char_type * _M_in_beg; + char_type *eback () { return _M_in_beg; } + char_type *gptr () {} + }; +} +namespace std +{ + typedef struct pthread_mutex_t __c_lock; + template class __basic_file; + template <> struct __basic_file + { + __basic_file (__c_lock * = 0); + bool is_open (); + }; + template struct basic_filebuf : public basic_streambuf <_CharT, _Traits> + { + typedef _CharT char_type; + typedef _Traits traits_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + typedef __basic_file < char >__file_type; + typedef typename traits_type::state_type __state_type; + __file_type _M_file; + char_type *_M_pback_cur_save; + bool _M_pback_init; + void _M_destroy_pback () throw () + { + _M_pback_cur_save += this->gptr () != this->eback (); + _M_pback_init = false; + } + bool is_open () throw () { return _M_file.is_open (); } + pos_type seekpos (pos_type, ios_base::openmode = ios_base::in | ios_base::out); + pos_type _M_seek (off_type, ios_base::seekdir, __state_type); + }; + template + typename basic_filebuf <_CharT, _Traits>::pos_type + basic_filebuf <_CharT, _Traits>::seekpos (pos_type __pos, ios_base::openmode) + { + pos_type __ret = (off_type ()); + if (this->is_open ()) + { + _M_destroy_pback (); + __ret = _M_seek (off_type (), ios_base::beg, __pos.state ()); + } + return __ret; + } + template class basic_filebuf >; +}