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 c++/79962] [5/6/7 Regression] ICE nonnull_check_p on a function template with a type-dependent attribute nonnull


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

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
We used to reject the code with:

k.cc: In substitution of ‘template<class T> void f(typename T::U) [with T =
S]’:
k.cc:8:9:   required from here
k.cc:2:6: error: nonnull argument has invalid operand number (argument 1)
 void f (typename T::U) __attribute__ ((__nonnull__ (T::i)));

because ARG here:

2818       if (!get_nonnull_operand (arg, &arg_num))
2819         {
2820           error ("nonnull argument has invalid operand number (argument
%lu)",
2821                  (unsigned long) attr_arg_num);

used to be const_decl, but since the default_conversion call, it's integer_cst.

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