﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1851	Warn on unassigned output variables (Using unbound output variables causes segfault)	adabe588@…	Martin Sjölund	"I'm not sure if I have filed a ticket about this before, I couldn't find it...

This code contains an output variable in the function `part` that is never assigned, when this value is used afterwards the program segfaults.  No warning is given that the output variable isn't assigned a value, so debugging is fairly hard. It would be nice to get a warning if the compiler can tell that an output variable isn't assigned, or if it isn't sure.

Call `Test.main()` to reproduce.

{{{
package Test

function toList
  input Tuple<Integer,Integer> t;
  output List<Integer> list;
algorithm
  list := match t
    local Integer n;
    case (_,n) then toList_helper(n);
  end match;
end toList;

protected function toList_helper
  input Integer node;
  output List<Integer> list;
algorithm
  list := {};
end toList_helper;

function part
  output Tuple<Integer,Integer> a;
  output Tuple<Integer,Integer> b;
algorithm
  (a,a) := ((1,2),(1,2));
end part;



function main
protected
  List<Integer> resB;
  Tuple<Integer,Integer> b;
algorithm
  (_,b) := part();
  resB := toList(b);
end main;

end Test;
}}}"	enhancement	closed	high	1.9.0	Frontend	trunk	fixed		
