Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002156 [Quercus] minor always 11-08-07 11:39 08-25-08 13:45
Reporter koreth View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 3.1.4
Summary 0002156: Compile fails on unreachable code
Description The following is legal, if somewhat nonsensical, PHP code (the real-life case was someone temporarily disabling a chunk of code that wasn't working properly):

<?php
for ($i = 1; $i < 10; $i++) {
    continue;
    print $i;
}

It runs fine in interpreted mode, but the compiler bombs out with the following error:

[11:37:26.958] java.lang.IllegalStateException: Location[null:0]'$i' is not analyzed.
[11:37:26.958] at com.caucho.quercus.expr.ProVarExpr$1.generate(ProVarExpr.java:289)
[11:37:26.958] at com.caucho.quercus.expr.ProVarExpr$1.generateValue(ProVarExpr.java:378)
[11:37:26.958] at com.caucho.quercus.function.ProValueMarshal.generate(ProValueMarshal.java:24)
[11:37:26.958] at com.caucho.quercus.program.ProStaticFunction$1.generateImpl(ProStaticFunction.java:358)
[11:37:26.958] at com.caucho.quercus.program.ProStaticFunction$1.generateTop(ProStaticFunction.java:289)
[11:37:26.958] at com.caucho.quercus.expr.ProFunctionExpr$1.generateImpl(ProFunctionExpr.java:224)
[11:37:26.958] at com.caucho.quercus.expr.ProFunctionExpr$1.generateTop(ProFunctionExpr.java:169)
[11:37:26.958] at com.caucho.quercus.expr.GenerateExpr.generateStatement(GenerateExpr.java:325)
[11:37:26.958] at com.caucho.quercus.statement.ProExprStatement$1.generateImpl(ProExprStatement.java:92)
[11:37:26.958] at com.caucho.quercus.statement.StatementGenerator.generate(StatementGenerator.java:91)
[11:37:26.958] at com.caucho.quercus.statement.ProBlockStatement$1.generateImpl(ProBlockStatement.java:106)
[11:37:26.958] at com.caucho.quercus.statement.StatementGenerator.generate(StatementGenerator.java:91)
[11:37:26.958] at com.caucho.quercus.statement.ProForStatement$1.generateImpl(ProForStatement.java:127)
[11:37:26.958] at com.caucho.quercus.statement.StatementGenerator.generate(StatementGenerator.java:91)
[11:37:26.958] at com.caucho.quercus.gen.QuercusMain.generate(QuercusMain.java:111)
[11:37:26.958] at com.caucho.java.gen.BaseClass.generateComponents(BaseClass.java:252)
[11:37:26.958] at com.caucho.java.gen.BaseClass.generateClassContent(BaseClass.java:239)
[11:37:26.958] at com.caucho.java.gen.BaseClass.generate(BaseClass.java:227)
[11:37:26.958] at com.caucho.java.gen.GenClass.generate(GenClass.java:116)
[11:37:26.958] at com.caucho.java.gen.JavaClassGenerator.generate(JavaClassGenerator.java:277)
[11:37:26.958] at com.caucho.quercus.gen.QuercusGenerator.generate(QuercusGenerator.java:90)
[11:37:26.958] at com.caucho.quercus.page.ProPageManager$CompileThread.run(ProPageManager.java:193)
[11:37:26.958] at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:690)
[11:37:26.958] at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:612)
[11:37:26.958] at java.lang.Thread.run(Thread.java:613)
Additional Information
Attached Files

- Relationships

- Notes
(0003355)
ferg
08-25-08 13:45

php/3650
 

- Issue History
Date Modified Username Field Change
11-08-07 11:39 koreth New Issue
08-25-08 13:45 ferg Note Added: 0003355
08-25-08 13:45 ferg Assigned To  => ferg
08-25-08 13:45 ferg Status new => closed
08-25-08 13:45 ferg Resolution open => fixed
08-25-08 13:45 ferg Fixed in Version  => 3.2.1


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker