This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/20840] @defined($somethingundefined + 1) gives 1
- From: "jistone at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Fri, 18 Nov 2016 19:17:23 +0000
- Subject: [Bug translator/20840] @defined($somethingundefined + 1) gives 1
- Auto-submitted: auto-generated
- References: <bug-20840-6586@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=20840
Josh Stone <jistone at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jistone at redhat dot com
--- Comment #1 from Josh Stone <jistone at redhat dot com> ---
Ugh. This is probably a regression from trying to make autocast @defined work,
where it now relies on resolved types. In const_folder::visit_defined_op:
// If we got to an expression with a known type, call it defined.
if (e->operand->type != pe_unknown)
value = 1;
collapse_this = true;
But in your case this is proven too optimistic. I think we do resolve the type
of the addition binop based on knowing the right-hand side, so that can try to
propagate the type to the left.
Maybe that binop type resolution can be more conservative? That is, still try
the type propagation from one side to the other, but leave the expression as a
whole unresolved until both sides are resolved.
--
You are receiving this mail because:
You are the assignee for the bug.