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
  • #7780
Closed
Open
Issue created Sep 13, 2016 by Peter Bortas@zinoOwner

String optimization bug

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

Reported by Jonas Wallden jonasw@roxen.com

I see unexpected string handling in 8.0.290 compared to 7.8. Test program:

void main()
{
  string s1 = "aaaaa";
  string s2 = "BBBBBBBB";
  werror("#1: %s\n", (s2 + s1)[..sizeof(s1) - 1]);
  s2 = (s2 + s1)[..sizeof(s1) - 1];
  werror("#2: %s\n", s2);
}

Output from 7.8:

#1: BBBBB
#2: BBBBB

Output from 8.0.290:

#1: BBBBB
#2: BBBBBBBBaaaaa
Assignee
Assign to
Time tracking