https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100463

--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
But suppose I change my mind and want to define a map from HWI_INT to int:

diff --git a/gcc/except.c b/gcc/except.c
index a7902bbd555..a47841cf395 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -149,6 +149,21 @@ static GTY(()) int call_site_base;

 static GTY(()) hash_map<tree_hash, tree> *type_to_runtime_map;

+typedef int_hash <HOST_WIDE_INT, 0, HOST_WIDE_INT_MAX> test_int_hash_t;
+typedef hash_map<test_int_hash_t, int> test_int_hash_map_t;
+static GTY(()) test_int_hash_map_t *test_int_hash_map;
+
+inline void
+gt_ggc_mx (test_int_hash_t *)
+{
+}
+
+inline void
+gt_pch_nx (test_int_hash_t *)
+{
+}
+
+
 static GTY(()) tree setjmp_fn;

 /* Describe the SjLj_Function_Context structure.  */


I now get another series of errors:

In file included from /ssd/src/gcc/trunk/gcc/hash-table.h:595,
                 from /ssd/src/gcc/trunk/gcc/coretypes.h:480,
                 from /ssd/src/gcc/trunk/gcc/except.c:114:
/ssd/src/gcc/trunk/gcc/hash-map.h: In instantiation of ‘static void hash_map<
<template-parameter-1-1>, <template-parameter-1-2>, <template-parameter-1-3>
>::hash_entry::pch_nx(hash_map< <template-parameter-1-1>,
<template-parameter-1-2>, <template-parameter-1-3> >::hash_entry&) [with KeyId
= int_hash<long int, 0, 9223372036854775807>; Value = int; Traits =
simple_hashmap_traits<default_hash_traits<int_hash<long int, 0,
9223372036854775807> >, int>]’:
/ssd/src/gcc/trunk/gcc/hash-table.h:1198:17:   required from ‘void
gt_pch_nx(hash_table<E>*) [with D = hash_map<int_hash<long int, 0,
9223372036854775807>, int>::hash_entry]’
/ssd/src/gcc/trunk/gcc/hash-map.h:314:13:   required from ‘void
gt_pch_nx(hash_map<K, V, H>*) [with K = int_hash<long int, 0,
9223372036854775807>; V = int; H =
simple_hashmap_traits<default_hash_traits<int_hash<long int, 0,
9223372036854775807> >, int>]’
./gt-except.h:97:19:   required from here
/ssd/src/gcc/trunk/gcc/hash-map.h:87:12: error: call of overloaded
‘gt_pch_nx(hash_map<int_hash<long int, 0, 9223372036854775807>, int>::Key&)’ is
ambiguous
  gt_pch_nx (e.m_key);
  ~~~~~~~~~~^~~~~~~~~
In file included from /ssd/src/gcc/trunk/gcc/hash-table.h:247,
                 from /ssd/src/gcc/trunk/gcc/coretypes.h:480,
                 from /ssd/src/gcc/trunk/gcc/except.c:114:
/ssd/src/gcc/trunk/gcc/ggc.h:341:1: note: candidate: ‘void gt_pch_nx(int)’
 gt_pch_nx (int)
 ^~~~~~~~~
/ssd/src/gcc/trunk/gcc/ggc.h:346:1: note: candidate: ‘void gt_pch_nx(unsigned
int)’
 gt_pch_nx (unsigned int)
 ^~~~~~~~~
In file included from /ssd/src/gcc/trunk/gcc/hash-table.h:595,
                 from /ssd/src/gcc/trunk/gcc/coretypes.h:480,
                 from /ssd/src/gcc/trunk/gcc/except.c:114:
/ssd/src/gcc/trunk/gcc/hash-map.h: In instantiation of ‘static void hash_map<
<template-parameter-1-1>, <template-parameter-1-2>, <template-parameter-1-3>
>::hash_entry::pch_nx_helper(T&, gt_pointer_operator, void*) [with T = long
int; KeyId = int_hash<long int, 0, 9223372036854775807>; Value = int; Traits =
simple_hashmap_traits<default_hash_traits<int_hash<long int, 0,
9223372036854775807> >, int>; gt_pointer_operator = void (*)(void*, void*)]’:
/ssd/src/gcc/trunk/gcc/hash-map.h:93:16:   required from ‘static void hash_map<
<template-parameter-1-1>, <template-parameter-1-2>, <template-parameter-1-3>
>::hash_entry::pch_nx(hash_map< <template-parameter-1-1>,
<template-parameter-1-2>, <template-parameter-1-3> >::hash_entry&,
gt_pointer_operator, void*) [with KeyId = int_hash<long int, 0,
9223372036854775807>; Value = int; Traits =
simple_hashmap_traits<default_hash_traits<int_hash<long int, 0,
9223372036854775807> >, int>; gt_pointer_operator = void (*)(void*, void*)]’
/ssd/src/gcc/trunk/gcc/hash-table.h:1181:17:   required from ‘void
hashtab_entry_note_pointers(void*, void*, gt_pointer_operator, void*) [with D =
hash_map<int_hash<long int, 0, 9223372036854775807>, int>::hash_entry;
gt_pointer_operator = void (*)(void*, void*)]’
/ssd/src/gcc/trunk/gcc/hash-table.h:1190:26:   required from ‘void
gt_pch_nx(hash_table<E>*) [with D = hash_map<int_hash<long int, 0,
9223372036854775807>, int>::hash_entry]’
/ssd/src/gcc/trunk/gcc/hash-map.h:314:13:   required from ‘void
gt_pch_nx(hash_map<K, V, H>*) [with K = int_hash<long int, 0,
9223372036854775807>; V = int; H =
simple_hashmap_traits<default_hash_traits<int_hash<long int, 0,
9223372036854775807> >, int>]’
./gt-except.h:97:19:   required from here
/ssd/src/gcc/trunk/gcc/hash-map.h:107:14: error: no matching function for call
to ‘gt_pch_nx(long int*, void (*&)(void*, void*), void*&)’
    gt_pch_nx (&x, op, cookie);
    ~~~~~~~~~~^~~~~~~~~~~~~~~~
In file included from /ssd/src/gcc/trunk/gcc/coretypes.h:454,
                 from /ssd/src/gcc/trunk/gcc/except.c:114:
/ssd/src/gcc/trunk/gcc/wide-int.h:3335:1: note: candidate: ‘template<class T>
void gt_pch_nx(generic_wide_int<storage>*)’
 gt_pch_nx (generic_wide_int <T> *)
 ^~~~~~~~~
/ssd/src/gcc/trunk/gcc/wide-int.h:3335:1: note:   template argument
deduction/substitution failed:
In file included from /ssd/src/gcc/trunk/gcc/hash-table.h:595,
                 from /ssd/src/gcc/trunk/gcc/coretypes.h:480,
                 from /ssd/src/gcc/trunk/gcc/except.c:114:
/ssd/src/gcc/trunk/gcc/hash-map.h:107:14: note:   mismatched types
‘generic_wide_int<storage>’ and ‘long int’
    gt_pch_nx (&x, op, cookie);
    ~~~~~~~~~~^~~~~~~~~~~~~~~~
In file included from /ssd/src/gcc/trunk/gcc/coretypes.h:454,
                 from /ssd/src/gcc/trunk/gcc/except.c:114:
/ssd/src/gcc/trunk/gcc/wide-int.h:3341:1: note: candidate: ‘template<class T>
void gt_pch_nx(generic_wide_int<storage>*, void (*)(void*, void*), void*)’
 gt_pch_nx (generic_wide_int <T> *, void (*) (void *, void *), void *)
 ^~~~~~~~~
/ssd/src/gcc/trunk/gcc/wide-int.h:3341:1: note:   template argument
deduction/substitution failed:
In file included from /ssd/src/gcc/trunk/gcc/hash-table.h:595,
                 from /ssd/src/gcc/trunk/gcc/coretypes.h:480,
                 from /ssd/src/gcc/trunk/gcc/except.c:114:
/ssd/src/gcc/trunk/gcc/hash-map.h:107:14: note:   mismatched types
‘generic_wide_int<storage>’ and ‘long int’
    gt_pch_nx (&x, op, cookie);
    ~~~~~~~~~~^~~~~~~~~~~~~~~~
In file included from /ssd/src/gcc/trunk/gcc/coretypes.h:454,
                 from /ssd/src/gcc/trunk/gcc/except.c:114:
/ssd/src/gcc/trunk/gcc/wide-int.h:3353:1: note: candidate: ‘template<int N>
void gt_pch_nx(trailing_wide_ints<N>*)’
 gt_pch_nx (trailing_wide_ints <N> *)
 ^~~~~~~~~
/ssd/src/gcc/trunk/gcc/wide-int.h:3353:1: note:   template argument
deduction/substitution failed:
In file included from /ssd/src/gcc/trunk/gcc/hash-table.h:595,
                 from /ssd/src/gcc/trunk/gcc/coretypes.h:480,
                 from /ssd/src/gcc/trunk/gcc/except.c:114:
/ssd/src/gcc/trunk/gcc/hash-map.h:107:14: note:   mismatched types
‘trailing_wide_ints<N>’ and ‘long int’
    gt_pch_nx (&x, op, cookie);
    ~~~~~~~~~~^~~~~~~~~~~~~~~~
In file included from /ssd/src/gcc/trunk/gcc/coretypes.h:454,
                 from /ssd/src/gcc/trunk/gcc/except.c:114:
/ssd/src/gcc/trunk/gcc/wide-int.h:3359:1: note: candidate: ‘template<int N>
void gt_pch_nx(trailing_wide_ints<N>*, void (*)(void*, void*), void*)’
 gt_pch_nx (trailing_wide_ints <N> *, void (*) (void *, void *), void *)
 ^~~~~~~~~
/ssd/src/gcc/trunk/gcc/wide-int.h:3359:1: note:   template argument
deduction/substitution failed:
In file included from /ssd/src/gcc/trunk/gcc/hash-table.h:595,
                 from /ssd/src/gcc/trunk/gcc/coretypes.h:480,
                 from /ssd/src/gcc/trunk/gcc/except.c:114:
/ssd/src/gcc/trunk/gcc/hash-map.h:107:14: note:   mismatched types
‘trailing_wide_ints<N>’ and ‘long int’
    gt_pch_nx (&x, op, cookie);
    ~~~~~~~~~~^~~~~~~~~~~~~~~~
In file included from /ssd/src/gcc/trunk/gcc/coretypes.h:469,
                 from /ssd/src/gcc/trunk/gcc/except.c:114:
/ssd/src/gcc/trunk/gcc/poly-int.h:2714:1: note: candidate: ‘template<unsigned
int N, class C> void gt_pch_nx(poly_int_pod<N, C>*)’
 gt_pch_nx (poly_int_pod<N, C> *)
 ^~~~~~~~~
/ssd/src/gcc/trunk/gcc/poly-int.h:2714:1: note:   template argument
deduction/substitution failed:
In file included from /ssd/src/gcc/trunk/gcc/hash-table.h:595,
                 from /ssd/src/gcc/trunk/gcc/coretypes.h:480,
                 from /ssd/src/gcc/trunk/gcc/except.c:114:
/ssd/src/gcc/trunk/gcc/hash-map.h:107:14: note:   mismatched types
‘poly_int_pod<N, C>’ and ‘long int’
    gt_pch_nx (&x, op, cookie);
    ~~~~~~~~~~^~~~~~~~~~~~~~~~
In file included from /ssd/src/gcc/trunk/gcc/coretypes.h:469,
                 from /ssd/src/gcc/trunk/gcc/except.c:114:
/ssd/src/gcc/trunk/gcc/poly-int.h:2720:1: note: candidate: ‘template<unsigned
int N, class C> void gt_pch_nx(poly_int_pod<N, C>*, void (*)(void*, void*),
void*)’
 gt_pch_nx (poly_int_pod<N, C> *, void (*) (void *, void *), void *)
 ^~~~~~~~~
/ssd/src/gcc/trunk/gcc/poly-int.h:2720:1: note:   template argument
deduction/substitution failed:
In file included from /ssd/src/gcc/trunk/gcc/hash-table.h:595,
                 from /ssd/src/gcc/trunk/gcc/coretypes.h:480,
                 from /ssd/src/gcc/trunk/gcc/except.c:114:
/ssd/src/gcc/trunk/gcc/hash-map.h:107:14: note:   mismatched types
‘poly_int_pod<N, C>’ and ‘long int’
    gt_pch_nx (&x, op, cookie);
    ~~~~~~~~~~^~~~~~~~~~~~~~~~
In file included from /ssd/src/gcc/trunk/gcc/coretypes.h:472,
                 from /ssd/src/gcc/trunk/gcc/except.c:114:
/ssd/src/gcc/trunk/gcc/machmode.h:1196:1: note: candidate: ‘template<class T>
void gt_pch_nx(pod_mode<T>*)’
 gt_pch_nx (pod_mode<T> *)
 ^~~~~~~~~
/ssd/src/gcc/trunk/gcc/machmode.h:1196:1: note:   template argument
deduction/substitution failed:
In file included from /ssd/src/gcc/trunk/gcc/hash-table.h:595,
                 from /ssd/src/gcc/trunk/gcc/coretypes.h:480,
                 from /ssd/src/gcc/trunk/gcc/except.c:114:
/ssd/src/gcc/trunk/gcc/hash-map.h:107:14: note:   mismatched types
‘pod_mode<T>’ and ‘long int’
    gt_pch_nx (&x, op, cookie);
    ~~~~~~~~~~^~~~~~~~~~~~~~~~
In file included from /ssd/src/gcc/trunk/gcc/coretypes.h:472,
                 from /ssd/src/gcc/trunk/gcc/except.c:114:
/ssd/src/gcc/trunk/gcc/machmode.h:1202:1: note: candidate: ‘template<class T>
void gt_pch_nx(pod_mode<T>*, void (*)(void*, void*), void*)’
 gt_pch_nx (pod_mode<T> *, void (*) (void *, void *), void *)
 ^~~~~~~~~
/ssd/src/gcc/trunk/gcc/machmode.h:1202:1: note:   template argument
deduction/substitution failed:
In file included from /ssd/src/gcc/trunk/gcc/hash-table.h:595,
                 from /ssd/src/gcc/trunk/gcc/coretypes.h:480,
                 from /ssd/src/gcc/trunk/gcc/except.c:114:
/ssd/src/gcc/trunk/gcc/hash-map.h:107:14: note:   mismatched types
‘pod_mode<T>’ and ‘long int’
    gt_pch_nx (&x, op, cookie);
    ~~~~~~~~~~^~~~~~~~~~~~~~~~
In file included from /ssd/src/gcc/trunk/gcc/hash-table.h:247,
                 from /ssd/src/gcc/trunk/gcc/coretypes.h:480,
                 from /ssd/src/gcc/trunk/gcc/except.c:114:
/ssd/src/gcc/trunk/gcc/ggc.h:331:1: note: candidate: ‘void gt_pch_nx(const
char*)’
 gt_pch_nx (const char *)
 ^~~~~~~~~
/ssd/src/gcc/trunk/gcc/ggc.h:331:1: note:   candidate expects 1 argument, 3
provided
/ssd/src/gcc/trunk/gcc/ggc.h:341:1: note: candidate: ‘void gt_pch_nx(int)’
 gt_pch_nx (int)
 ^~~~~~~~~
/ssd/src/gcc/trunk/gcc/ggc.h:341:1: note:   candidate expects 1 argument, 3
provided
/ssd/src/gcc/trunk/gcc/ggc.h:346:1: note: candidate: ‘void gt_pch_nx(unsigned
int)’
 gt_pch_nx (unsigned int)
 ^~~~~~~~~
/ssd/src/gcc/trunk/gcc/ggc.h:346:1: note:   candidate expects 1 argument, 3
provided
In file included from /ssd/src/gcc/trunk/gcc/hash-table.h:248,
                 from /ssd/src/gcc/trunk/gcc/coretypes.h:480,
                 from /ssd/src/gcc/trunk/gcc/except.c:114:
/ssd/src/gcc/trunk/gcc/vec.h:1369:1: note: candidate: ‘template<class T, class
A> void gt_pch_nx(vec<T, A, vl_embed>*)’
 gt_pch_nx (vec<T, A, vl_embed> *v)
 ^~~~~~~~~
/ssd/src/gcc/trunk/gcc/vec.h:1369:1: note:   template argument
deduction/substitution failed:
In file included from /ssd/src/gcc/trunk/gcc/hash-table.h:595,
                 from /ssd/src/gcc/trunk/gcc/coretypes.h:480,
                 from /ssd/src/gcc/trunk/gcc/except.c:114:
/ssd/src/gcc/trunk/gcc/hash-map.h:107:14: note:   mismatched types ‘vec<T, A,
vl_embed>’ and ‘long int’
    gt_pch_nx (&x, op, cookie);
    ~~~~~~~~~~^~~~~~~~~~~~~~~~
In file included from /ssd/src/gcc/trunk/gcc/hash-table.h:248,
                 from /ssd/src/gcc/trunk/gcc/coretypes.h:480,
                 from /ssd/src/gcc/trunk/gcc/except.c:114:
/ssd/src/gcc/trunk/gcc/vec.h:1378:1: note: candidate: ‘template<class T, class
A> void gt_pch_nx(vec<T*, A, vl_embed>*, gt_pointer_operator, void*)’
 gt_pch_nx (vec<T *, A, vl_embed> *v, gt_pointer_operator op, void *cookie)
 ^~~~~~~~~
/ssd/src/gcc/trunk/gcc/vec.h:1378:1: note:   template argument
deduction/substitution failed:
In file included from /ssd/src/gcc/trunk/gcc/hash-table.h:595,
                 from /ssd/src/gcc/trunk/gcc/coretypes.h:480,
                 from /ssd/src/gcc/trunk/gcc/except.c:114:
/ssd/src/gcc/trunk/gcc/hash-map.h:107:14: note:   mismatched types ‘vec<T*, A,
vl_embed>’ and ‘long int’
    gt_pch_nx (&x, op, cookie);
    ~~~~~~~~~~^~~~~~~~~~~~~~~~
In file included from /ssd/src/gcc/trunk/gcc/hash-table.h:248,
                 from /ssd/src/gcc/trunk/gcc/coretypes.h:480,
                 from /ssd/src/gcc/trunk/gcc/except.c:114:
/ssd/src/gcc/trunk/gcc/vec.h:1386:1: note: candidate: ‘template<class T, class
A> void gt_pch_nx(vec<T, A, vl_embed>*, gt_pointer_operator, void*)’
 gt_pch_nx (vec<T, A, vl_embed> *v, gt_pointer_operator op, void *cookie)
 ^~~~~~~~~
/ssd/src/gcc/trunk/gcc/vec.h:1386:1: note:   template argument
deduction/substitution failed:
In file included from /ssd/src/gcc/trunk/gcc/hash-table.h:595,
                 from /ssd/src/gcc/trunk/gcc/coretypes.h:480,
                 from /ssd/src/gcc/trunk/gcc/except.c:114:
/ssd/src/gcc/trunk/gcc/hash-map.h:107:14: note:   mismatched types ‘vec<T, A,
vl_embed>’ and ‘long int’
    gt_pch_nx (&x, op, cookie);
    ~~~~~~~~~~^~~~~~~~~~~~~~~~
make[2]: *** [Makefile:1142: except.o] Error 1
make[2]: Leaving directory '/ssd/build/gcc-trunk/gcc'
make[1]: *** [Makefile:4781: all-stage1-gcc] Error 2
make[1]: Leaving directory '/ssd/build/gcc-trunk'
make: *** [Makefile:27587: stage1-bubble] Error 2
make: Leaving directory '/ssd/build/gcc-trunk'
Command exited with non-zero status 2

Reply via email to