Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pike pike
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 104
    • Issues 104
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • pikelang
  • pikepike
  • Issues
  • #2726
Closed
Open
Issue created Jan 31, 2002 by Peter Bortas@zinoOwner

Line number bug (not shared nodes related)

Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2726

Reported by Martin Stjernholm mast@roxen.com

In this program, Pike reports the error on the line indicated with the comment:

    mixed foo;
    array bar = ({});

    int main()
    {
      int i = 1;
      if (i) {
	foo = bar[i];
      }
    } // Attempt to index the empty array with 1.

The problem is the same whether or not shared nodes are enabled. It's interesting that the problem disappears if the variable i isn't function local, or if bar is replaced by a literal ({}) but not if it's made constant.

The problem does not exist in 7.2 and earlier. Tested in a Pike compiled without machine code.

Assignee
Assign to
Time tracking