#include "except.h"
 #include "function.h"
 #include "toplev.h"
-#if BUILDING_GCC_VERSION >= 5000
 #include "expr.h"
-#endif
 #include "basic-block.h"
 #include "intl.h"
 #include "ggc.h"
 #include "params.h"
 #endif
 
-#if BUILDING_GCC_VERSION <= 4009
-#include "pointer-set.h"
-#else
 #include "hash-map.h"
-#endif
 
 #if BUILDING_GCC_VERSION >= 7000
 #include "memmodel.h"
 #include "gimple-ssa.h"
 #include "ssa-iterators.h"
 
-#if BUILDING_GCC_VERSION >= 5000
 #include "builtins.h"
-#endif
 
 /* missing from basic_block.h... */
 void debug_dominance_info(enum cdi_direction dir);
 #define TODO_dump_func 0
 #define TODO_dump_cgraph 0
 
-#if BUILDING_GCC_VERSION <= 4009
-#define TODO_verify_il 0
-#define AVAIL_INTERPOSABLE AVAIL_OVERWRITABLE
-
-#define section_name_prefix LTO_SECTION_NAME_PREFIX
-#define fatal_error(loc, gmsgid, ...) fatal_error((gmsgid), __VA_ARGS__)
-
-rtx emit_move_insn(rtx x, rtx y);
-
-typedef struct rtx_def rtx_insn;
-
-static inline const char *get_decl_section_name(const_tree decl)
-{
-       if (DECL_SECTION_NAME(decl) == NULL_TREE)
-               return NULL;
-
-       return TREE_STRING_POINTER(DECL_SECTION_NAME(decl));
-}
-
-static inline void set_decl_section_name(tree node, const char *value)
-{
-       if (value)
-               DECL_SECTION_NAME(node) = build_string(strlen(value) + 1, value);
-       else
-               DECL_SECTION_NAME(node) = NULL;
-}
-#endif
-
-#if BUILDING_GCC_VERSION == 4009
-typedef struct gimple_statement_asm gasm;
-typedef struct gimple_statement_base gassign;
-typedef struct gimple_statement_call gcall;
-typedef struct gimple_statement_base gcond;
-typedef struct gimple_statement_base gdebug;
-typedef struct gimple_statement_base ggoto;
-typedef struct gimple_statement_phi gphi;
-typedef struct gimple_statement_base greturn;
-
-static inline gasm *as_a_gasm(gimple stmt)
-{
-       return as_a<gasm>(stmt);
-}
-
-static inline const gasm *as_a_const_gasm(const_gimple stmt)
-{
-       return as_a<const gasm>(stmt);
-}
-
-static inline gassign *as_a_gassign(gimple stmt)
-{
-       return stmt;
-}
-
-static inline const gassign *as_a_const_gassign(const_gimple stmt)
-{
-       return stmt;
-}
-
-static inline gcall *as_a_gcall(gimple stmt)
-{
-       return as_a<gcall>(stmt);
-}
-
-static inline const gcall *as_a_const_gcall(const_gimple stmt)
-{
-       return as_a<const gcall>(stmt);
-}
-
-static inline gcond *as_a_gcond(gimple stmt)
-{
-       return stmt;
-}
-
-static inline const gcond *as_a_const_gcond(const_gimple stmt)
-{
-       return stmt;
-}
-
-static inline gdebug *as_a_gdebug(gimple stmt)
-{
-       return stmt;
-}
-
-static inline const gdebug *as_a_const_gdebug(const_gimple stmt)
-{
-       return stmt;
-}
-
-static inline ggoto *as_a_ggoto(gimple stmt)
-{
-       return stmt;
-}
-
-static inline const ggoto *as_a_const_ggoto(const_gimple stmt)
-{
-       return stmt;
-}
-
-static inline gphi *as_a_gphi(gimple stmt)
-{
-       return as_a<gphi>(stmt);
-}
-
-static inline const gphi *as_a_const_gphi(const_gimple stmt)
-{
-       return as_a<const gphi>(stmt);
-}
-
-static inline greturn *as_a_greturn(gimple stmt)
-{
-       return stmt;
-}
-
-static inline const greturn *as_a_const_greturn(const_gimple stmt)
-{
-       return stmt;
-}
-#endif
-
 #define TODO_ggc_collect 0
 #define NODE_SYMBOL(node) (node)
 #define NODE_DECL(node) (node)->decl
        return g->get_passes()->get_pass_for_id(id);
 }
 
-#if BUILDING_GCC_VERSION >= 5000 && BUILDING_GCC_VERSION < 6000
+#if BUILDING_GCC_VERSION < 6000
 /* gimple related */
 template <>
 template <>
 }
 #endif
 
-#if BUILDING_GCC_VERSION >= 5000
 #define TODO_verify_ssa TODO_verify_il
 #define TODO_verify_flow TODO_verify_il
 #define TODO_verify_stmts TODO_verify_il
 {
        referring_node->remove_stmt_references(stmt);
 }
-#endif
 
 #if BUILDING_GCC_VERSION < 6000
 #define get_inner_reference(exp, pbitsize, pbitpos, poffset, pmode, punsignedp, preversep, pvolatilep, keep_aligning)  \
 
                .type                   = GIMPLE_PASS,
                .name                   = _PASS_NAME_NAME,
                .optinfo_flags          = OPTGROUP_NONE,
-#if BUILDING_GCC_VERSION >= 5000
-#elif BUILDING_GCC_VERSION == 4009
-               .has_gate               = _HAS_GATE,
-               .has_execute            = _HAS_EXECUTE,
-#else
-               .gate                   = _GATE,
-               .execute                = _EXECUTE,
-               .sub                    = NULL,
-               .next                   = NULL,
-               .static_pass_number     = 0,
-#endif
                .tv_id                  = TV_NONE,
                .properties_required    = PROPERTIES_REQUIRED,
                .properties_provided    = PROPERTIES_PROVIDED,
        _PASS_NAME_PASS() : gimple_opt_pass(_PASS_NAME_PASS_DATA, g) {}
 
 #ifndef NO_GATE
-#if BUILDING_GCC_VERSION >= 5000
        virtual bool gate(function *) { return _GATE(); }
-#else
-       virtual bool gate(void) { return _GATE(); }
-#endif
 #endif
 
        virtual opt_pass * clone () { return new _PASS_NAME_PASS(); }
 
 #ifndef NO_EXECUTE
-#if BUILDING_GCC_VERSION >= 5000
        virtual unsigned int execute(function *) { return _EXECUTE(); }
-#else
-       virtual unsigned int execute(void) { return _EXECUTE(); }
-#endif
 };
 }
 
 
                .type                   = IPA_PASS,
                .name                   = _PASS_NAME_NAME,
                .optinfo_flags          = OPTGROUP_NONE,
-#if BUILDING_GCC_VERSION >= 5000
-#elif BUILDING_GCC_VERSION == 4009
-               .has_gate               = _HAS_GATE,
-               .has_execute            = _HAS_EXECUTE,
-#else
-               .gate                   = _GATE,
-               .execute                = _EXECUTE,
-               .sub                    = NULL,
-               .next                   = NULL,
-               .static_pass_number     = 0,
-#endif
                .tv_id                  = TV_NONE,
                .properties_required    = PROPERTIES_REQUIRED,
                .properties_provided    = PROPERTIES_PROVIDED,
                         _VARIABLE_TRANSFORM) {}
 
 #ifndef NO_GATE
-#if BUILDING_GCC_VERSION >= 5000
        virtual bool gate(function *) { return _GATE(); }
-#else
-       virtual bool gate(void) { return _GATE(); }
-#endif
 
        virtual opt_pass *clone() { return new _PASS_NAME_PASS(); }
 
 #ifndef NO_EXECUTE
-#if BUILDING_GCC_VERSION >= 5000
        virtual unsigned int execute(function *) { return _EXECUTE(); }
-#else
-       virtual unsigned int execute(void) { return _EXECUTE(); }
-#endif
 #endif
 };
 }
 
                .type                   = RTL_PASS,
                .name                   = _PASS_NAME_NAME,
                .optinfo_flags          = OPTGROUP_NONE,
-#if BUILDING_GCC_VERSION >= 5000
-#elif BUILDING_GCC_VERSION == 4009
-               .has_gate               = _HAS_GATE,
-               .has_execute            = _HAS_EXECUTE,
-#else
-               .gate                   = _GATE,
-               .execute                = _EXECUTE,
-               .sub                    = NULL,
-               .next                   = NULL,
-               .static_pass_number     = 0,
-#endif
                .tv_id                  = TV_NONE,
                .properties_required    = PROPERTIES_REQUIRED,
                .properties_provided    = PROPERTIES_PROVIDED,
        _PASS_NAME_PASS() : rtl_opt_pass(_PASS_NAME_PASS_DATA, g) {}
 
 #ifndef NO_GATE
-#if BUILDING_GCC_VERSION >= 5000
        virtual bool gate(function *) { return _GATE(); }
-#else
-       virtual bool gate(void) { return _GATE(); }
-#endif
 #endif
 
        virtual opt_pass *clone() { return new _PASS_NAME_PASS(); }
 
 #ifndef NO_EXECUTE
-#if BUILDING_GCC_VERSION >= 5000
        virtual unsigned int execute(function *) { return _EXECUTE(); }
-#else
-       virtual unsigned int execute(void) { return _EXECUTE(); }
-#endif
 #endif
 };
 }
 
                .type                   = SIMPLE_IPA_PASS,
                .name                   = _PASS_NAME_NAME,
                .optinfo_flags          = OPTGROUP_NONE,
-#if BUILDING_GCC_VERSION >= 5000
-#elif BUILDING_GCC_VERSION == 4009
-               .has_gate               = _HAS_GATE,
-               .has_execute            = _HAS_EXECUTE,
-#else
-               .gate                   = _GATE,
-               .execute                = _EXECUTE,
-               .sub                    = NULL,
-               .next                   = NULL,
-               .static_pass_number     = 0,
-#endif
                .tv_id                  = TV_NONE,
                .properties_required    = PROPERTIES_REQUIRED,
                .properties_provided    = PROPERTIES_PROVIDED,
        _PASS_NAME_PASS() : simple_ipa_opt_pass(_PASS_NAME_PASS_DATA, g) {}
 
 #ifndef NO_GATE
-#if BUILDING_GCC_VERSION >= 5000
        virtual bool gate(function *) { return _GATE(); }
-#else
-       virtual bool gate(void) { return _GATE(); }
-#endif
 #endif
 
        virtual opt_pass *clone() { return new _PASS_NAME_PASS(); }
 
 #ifndef NO_EXECUTE
-#if BUILDING_GCC_VERSION >= 5000
        virtual unsigned int execute(function *) { return _EXECUTE(); }
-#else
-       virtual unsigned int execute(void) { return _EXECUTE(); }
-#endif
 #endif
 };
 }