Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 317594 - Cannot acquire AST when using alternate returns
Summary: Cannot acquire AST when using alternate returns
Status: RESOLVED WORKSFORME
Alias: None
Product: PTP
Classification: Tools
Component: Photran.Refactoring Engine (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Jeffrey Overbey CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 319622 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-22 10:55 EDT by Matthew Fotzler CLA
Modified: 2011-03-17 20:56 EDT (History)
2 users (show)

See Also:


Attachments
source code using alternate return (284 bytes, application/octet-stream)
2010-06-22 10:56 EDT, Matthew Fotzler CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Fotzler CLA 2010-06-22 10:55:22 EDT
Build Identifier: 

When using the attached source code that includes alternate returns, the following null pointer exception is received.

java.lang.NullPointerException
       at org.eclipse.photran.internal.core.analysis.binding.BindingCollector.bind(BindingCollector.java:142)
       at org.eclipse.photran.internal.core.analysis.binding.BindingCollector.bindAsParam(BindingCollector.java:162)
       at org.eclipse.photran.internal.core.analysis.binding.ReferenceCollector.visitASTSubroutineStmtNode(ReferenceCollector.java:850)
       at org.eclipse.photran.internal.core.parser.ASTSubroutineStmtNode.accept(ASTSubroutineStmtNode.java:95)
       at org.eclipse.photran.internal.core.parser.ASTVisitor.traverseChildren(ASTVisitor.java:21)
       at org.eclipse.photran.internal.core.parser.ASTVisitor.visitASTSubroutineSubprogramNode(ASTVisitor.java:359)
       at org.eclipse.photran.internal.core.parser.ASTSubroutineSubprogramNode.accept(ASTSubroutineSubprogramNode.java:100)
       at org.eclipse.photran.internal.core.parser.ASTVisitor.traverseChildren(ASTVisitor.java:21)
       at org.eclipse.photran.internal.core.parser.ASTVisitor.visitASTListNode(ASTVisitor.java:26)
       at org.eclipse.photran.internal.core.parser.ASTListNode.accept(ASTListNode.java:130)
       at org.eclipse.photran.internal.core.parser.ASTVisitor.traverseChildren(ASTVisitor.java:21)
       at org.eclipse.photran.internal.core.parser.ASTVisitor.visitASTExecutableProgramNode(ASTVisitor.java:176)
       at org.eclipse.photran.internal.core.parser.ASTExecutableProgramNode.accept(ASTExecutableProgramNode.java:61)
       at org.eclipse.photran.internal.core.FortranAST.accept(FortranAST.java:53)
       at org.eclipse.photran.internal.core.analysis.binding.Binder.bind(Binder.java:55)
       at org.eclipse.photran.internal.core.vpg.PhotranVPGBuilder.populateVPG(PhotranVPGBuilder.java:468)
       at org.eclipse.photran.internal.core.vpg.PhotranVPGBuilder.populateVPG(PhotranVPGBuilder.java:1)
       at org.eclipse.rephraserengine.core.vpg.VPG.computeEdgesAndAnnotations(VPG.java:203)
       at org.eclipse.rephraserengine.core.vpg.VPG.acquireTransientAST(VPG.java:147)
       at org.eclipse.rephraserengine.core.vpg.VPG.forceRecomputationOfEdgesAndAnnotations(VPG.java:292)
       at org.eclipse.rephraserengine.core.vpg.eclipse.EclipseVPG$VPGResourceDeltaVisitor.index(EclipseVPG.java:375)
       at org.eclipse.rephraserengine.core.vpg.eclipse.EclipseVPG$VPGResourceDeltaJob.runInWorkspace(EclipseVPG.java:266)
       at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Reproducible: Always
Comment 1 Matthew Fotzler CLA 2010-06-22 10:56:18 EDT
Created attachment 172421 [details]
source code using alternate return
Comment 2 Matthew Fotzler CLA 2010-06-24 10:48:52 EDT
Will need to fix control flow graph when this support is added.
Comment 3 Jeffrey Overbey CLA 2011-03-17 11:23:17 EDT
This appears to be fixed in HEAD/7.0 -- I'm not sure exactly when it was fixed though...
Comment 4 Jeffrey Overbey CLA 2011-03-17 20:56:28 EDT
*** Bug 319622 has been marked as a duplicate of this bug. ***