se compile crash

1 message Options
Embed this post
Permalink
Jörgen Tegnér

se compile crash

Reply Threaded More More options
Print post
Permalink
Hi list,

something for rainy summer days ..

The following code crashes compile, latest svn revision. I've tried to
find the cause
but didn't succeed. The
patch file migth be useful in finding the correct fix.

The attached files are stripped from most useful code so it will not do
anything meaningful once compiled.

Any ideas?

/Jörgen

[se.diff]

Index: projects/se_svn/smarteiffel/trunk/tools/instruction/when_clause.e
===================================================================
--- projects/se_svn/smarteiffel/trunk/tools/instruction/when_clause.e (revision 9335)
+++ projects/se_svn/smarteiffel/trunk/tools/instruction/when_clause.e (arbetskopia)
@@ -243,6 +243,7 @@
  bi: INTEGER
  do
  cpp.pending_c_function_body.append(once "%Nif(")
+ if values /= Void then
  from
  bi := values.lower
  until
@@ -271,6 +272,7 @@
  cpp.pending_c_function_body.append(once "||")
  end
  end
+ end
  cpp.pending_c_function_body.append(once "){%N")
  if compound /= Void then
  compound.compile_to_c(type)
@@ -279,19 +281,25 @@
  end
 
  compile_to_c_switch (type: TYPE) is
+ require
+ values /= Void
  local
  bi, v: INTEGER
  do
+ cpp.pending_c_function_body.append(once "/* testing compile_to_c_switch */")
+ if values /= Void then
  from
  bi := values.lower
  until
  bi > values.upper
  loop
+ cpp.pending_c_function_body.append(once "/* first loop in compile_to_c_switch */")
  from
  v := values.item(bi)
  until
  v > values.item(bi + 1)
  loop
+ cpp.pending_c_function_body.append(once "/* second loop in compile_to_c_switch */")
  cpp.pending_c_function_body.append(once "case ")
  v.append_in(cpp.pending_c_function_body)
  cpp.pending_c_function_body.append(once ":%N")
@@ -299,7 +307,9 @@
  end
  bi := bi + 2
  end
+ end
  if compound /= Void then
+ cpp.pending_c_function_body.append(once "/* compound in compile_to_c_switch */")
  compound.compile_to_c(type)
  end
  cpp.pending_c_function_body.append(once "break;%N")
Index: projects/se_svn/smarteiffel/trunk/tools/generation/c/c_splitter_no_split.e
===================================================================
--- projects/se_svn/smarteiffel/trunk/tools/generation/c/c_splitter_no_split.e (revision 9335)
+++ projects/se_svn/smarteiffel/trunk/tools/generation/c/c_splitter_no_split.e (arbetskopia)
@@ -74,8 +74,8 @@
  echo.put_string(once "No split enabled.%N")
  end
 
-invariant
- ace.no_split
+--invariant
+-- ace.no_split
 
 end -- class C_SPLITTER_NO_SPLIT
 --
Index: projects/se_svn/smarteiffel/trunk/tools/generation/c/c_splitter_split.e
===================================================================
--- projects/se_svn/smarteiffel/trunk/tools/generation/c/c_splitter_split.e (revision 9335)
+++ projects/se_svn/smarteiffel/trunk/tools/generation/c/c_splitter_split.e (arbetskopia)
@@ -79,8 +79,8 @@
  c.remove_suffix(once ".obj")
  Result := True
  end
- ensure
- Result implies name.count < old (name.count)
+-- ensure
+-- Result implies name.count < old (name.count)
  end
 
  backup_tfw_connect (suffix: STRING) is
 



crash.tar.bz2 (3K) Download Attachment