PR# 19028 Semi-strict Boolean constant evaluation

Problem Report Summary
Submitter: karsten_heusser
Category: Compiler
Priority: High
Date: 2015/01/31
Class: Bug
Severity: Serious
Number: 19028
Release: 14.05
Confidential: No
Status: Closed
Responsible:
Environment: MS Windows 8.1, 64 bits
Synopsis: Semi-strict Boolean constant evaluation

Description
The given code example should not show
any of the lines starting with "(n) ...".
However, line "(1) This text ..." shows up
after running the _finalized_ program.

The bug does _not_ come up with
- strict Boolean operation
- Boolean constants obtained via once ... end
- workbench code.
To Reproduce
class
	APPLICATION

create
	make

feature {NONE} -- Initialization

	make
		local
			bool_local: BOOLEAN
		do
			bool_local := True

			if bool_local and then bool_constant then
				print ("(1) This text should not appear.%N")
			end

			if bool_local and then bool_once then
				print ("(2) This text should not appear.%N")
			end

			if bool_local and bool_constant then
				print ("(3) This text should not appear.%N")
			end

			if bool_local and bool_once then
				print ("(4) This text should not appear.%N")
			end

			print ("Press ENTER.%N%N")
			io.read_character
		end

feature {ANY} -- Access

	bool_constant: BOOLEAN = False
	bool_once: BOOLEAN once Result := False end

end
Problem Report Interactions
From:manus_eiffel    Date:2015/02/02    Status: Closed    Download   
This is now fixed in rev#96570 and should be part of release 15.05.

From:manus_eiffel    Date:2015/02/02    Status: Analyzed    Download   
Thanks for the report. We have added a new regression test test#final122 and we are looking at what is causing this.