Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"or" does not short-circuit at -O4 #3

Open
GoogleCodeExporter opened this issue Feb 1, 2016 · 0 comments
Open

"or" does not short-circuit at -O4 #3

GoogleCodeExporter opened this issue Feb 1, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. create a simple template that includes an "or" operator with a placeholder 
on each side
2. compile it with -O4


What is the expected output? What do you see instead?

If the first argument is True, the second should not be evaluated.  This is not 
the case.

There is code in optimizer.py in AnalyzeBinOp to not hoist if the operator is 
"and", and the same 
logic should apply to "or".

Original issue reported on code.google.com by jaekmcgu...@gmail.com on 15 Jan 2010 at 2:17

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant