Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • T titan.core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 114
    • Issues 114
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Eclipse ProjectsEclipse Projects
  • Eclipse Titan
  • titan.core
  • Issues
  • #495
Closed
Open
Issue created Jul 25, 2020 by Eclipse Webmaster@webmasterOwner

FATAL ERROR is thrown by uninitialized array index

Submitted by Elemer Lelik

Link to original bug (#565542)

Description

module FatalError
{

modulepar
{ 
  integer     tsp_cl_num := 10;  
}


type component MTC_CT       {}; 


 testcase tc_Fatal_Error() runs on MTC_CT 
  {
    //This is OK 
    const integer     cl_num0 := 10;
    var   integer     Int0[cl_num0];
    //This terminates in a scary FATAL ERROR:
    const integer   cl_num := tsp_cl_num;
    var integer     Int[cl_num];
    //FATAL ERROR: /home/user/titan.core/Install/bin/compiler: In line 245 of ArrayDimensions.cc: ArrayDimension::get_value_type()
    //a more graceful exit, similar to the one below would be desirable:
    //This throws a controlled  error:
    //var integer     Int[tsp_cl_num];
    //FatalError.ttcn:18.25-34: error: Reference to an (evaluable) constant value was expected instead of module parameter `@FatalError.tsp_cl_num'
    
  }  

}

Version: 7.1.0

Edited Jun 07, 2021 by Adam Knapp
Assignee
Assign to
Time tracking

Copyright © Eclipse Foundation, Inc. All Rights Reserved.     Privacy Policy | Terms of Use | Copyright Agent