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

--- Comment #4 from Rogério de Souza Moraes <rogerio.souza at gmail dot com> ---
Hi Andrew,

thank you for the quick reply. The "getLocalCopy" on this example is just to
provide a quick way to reproduce the issue. Here is the getLocalCopy function
of this example.

extern void getLocalCopy(std::map<int*, sysDLoc>&);

I added the file bug2.cpp which is another way to reproduce the issue.

The issue only happens when the compiler uses inline, which triggers the error
on "stl_tree.h:2090:32".

I could not find any condition that would consider the example codes as invalid
or that leads to "undefined behavior", do you see any?

Considering that this warning only happens on GCC 12.1, the testcases are valid
wouldn´t it be an issue on this compiler version? Wouldn´t it require a fix on
"stl_tree.h" to prevent this warning?

Regards,
Rogerio

Reply via email to