https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93710
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
For the whole testcase with the patch we generate:
93710-2.C:6:3: error: conversion from ‘long int’ to ‘A’ is ambiguous
6 | 0L,
| ^~
93710-2.C:1:21: note: candidate: ‘A::A(char*)’
1 | struct A { A (int); A (char*); int i; };
| ^
93710-2.C:1:12: note: candidate: ‘A::A(int)’
1 | struct A { A (int); A (char*); int i; };
| ^
93710-2.C:7:3: error: invalid conversion from ‘int*’ to ‘int’ [-fpermissive]
7 | &x, // accurate location
| ^~
| |
| int*
93710-2.C:1:15: note: initializing argument 1 of ‘A::A(int)’
1 | struct A { A (int); A (char*); int i; };
| ^~~
93710-2.C:9:23: error: conversion from ‘long unsigned int’ to ‘A’ is ambiguous
9 | __builtin_offsetof (A, i)
| ~~~~~~~~~~~~~~~~~~~~^~~~~
93710-2.C:1:21: note: candidate: ‘A::A(char*)’
1 | struct A { A (int); A (char*); int i; };
| ^
93710-2.C:1:12: note: candidate: ‘A::A(int)’
1 | struct A { A (int); A (char*); int i; };
| ^
Testing pending.