Skip to content
Snippets Groups Projects
Commit e1c0c908 authored by David Malcolm's avatar David Malcolm
Browse files

analyzer: fix overeager sharing of bounded_range instances [PR102662]


This was leading to an assertion failure ICE on a switch stmt when using
-fstrict-enums, due to erroneously reusing a range involving one enum
with a range involving a different enum.

gcc/analyzer/ChangeLog:
	PR analyzer/102662
	* constraint-manager.cc (bounded_range::operator==): Require the
	types to be the same for equality.

gcc/testsuite/ChangeLog:
	PR analyzer/102662
	* g++.dg/analyzer/pr102662.C: New test.

Signed-off-by: default avatarDavid Malcolm <dmalcolm@redhat.com>
parent 132f1c27
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment