This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/33735] [4.3 Regression] verify_stmts failed: missing PHI def



------- Comment #2 from rguenth at gcc dot gnu dot org  2007-10-11 10:12 -------
Reduced testcase, fails with -O:

./cc1plus -quiet -O incomingscript.3.min.ii -m32
incomingscript.3.min.ii: In function 'void run()':
incomingscript.3.min.ii:41: error: missing PHI def
py_state_1(ab) = PHI <py_state_2(ab)(2), py_state_4(ab)(4), py_state_4(ab)(13),
py_state_4(ab)(12), (6), (7)>

incomingscript.3.min.ii:41: error: missing PHI def
py_state_1(ab) = PHI <py_state_2(ab)(2), py_state_4(ab)(4), py_state_4(ab)(13),
py_state_4(ab)(12), (6), (7)>

incomingscript.3.min.ii:41: internal compiler error: verify_stmts failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

This check was added by Alexandre with

2007-10-06  Alexandre Oliva  <aoliva@redhat.com>

        PR tree-optimization/33572
        * tree-cfg.c (verify_stmts): Check for missing PHI defs.
        * tree-inline.c (update_ssa_across_eh_edges): Renamed to...
        (update_ssa_across_abnormal_edges): ... this.  Set slots in the
        return PHI node.
        (copy_edges_for_bb): Handle nonlocal label edges.
        (make_nonlocal_label_edges): Deleted.
        (optimize_inline_calls): Don't call it.



---------------

typedef struct _ts { } PyThreadState;
PyThreadState * Py_NewInterpreter(void);
void Py_EndInterpreter(PyThreadState *);
typedef int _Atomic_word;
_Atomic_word __exchange_and_add(volatile _Atomic_word*, int);
namespace std __attribute__ ((__visibility__ ("default"))) {
    template<typename _Alloc>     class allocator;
    template<class _CharT>     struct char_traits;
    template<typename _CharT, typename _Traits = char_traits<_CharT>, typename
_Alloc = allocator<_CharT> > class basic_string;
    typedef basic_string<char> string;
    template<typename _Tp>     class allocator {
    public:
        ~allocator() throw() { }
    };
    template<typename _CharT, typename _Traits, typename _Alloc>
    class basic_string
    {
        typedef _Alloc allocator_type;
        struct _Rep {
            void  _M_dispose(const _Alloc& __a)  {
                if (__exchange_and_add(&this->_M_refcount, -1) <= 0)
                    _M_destroy(__a);
            }
            void  _M_destroy(const _Alloc&) throw();
            _Atomic_word _M_refcount;
        };
        _Rep* _M_rep() const;
    public:
        basic_string(const _CharT* __s, const _Alloc& __a = _Alloc());
        ~basic_string()       {
            _M_rep()->_M_dispose(this->get_allocator());
        }
        allocator_type get_allocator();
    };
};
class ApplicationError {
public:
    ApplicationError(std::string errormsg) : errormsg(errormsg)  { }
    std::string errormsg;
};
void run()
{
    PyThreadState *py_state=__null;
    try {
        if (!(py_state=Py_NewInterpreter()))
            throw ApplicationError("error");
    }
    catch(ApplicationError e) {
        Py_EndInterpreter(py_state);
    }
}


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aoliva at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33735


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]