[EXT_EP-7633] Local struct with non-constant initializer treated as static scope variable Created: 30/Apr/14  Updated: 16/Feb/22  Resolved: 30/Apr/14

Status: Fixed
Project: Embedded Software & Tools
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Medium
Reporter: TI User Assignee: TI User
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Product: Code Generation Tools
Internal ID: CODEGEN-848
OldID: SDSCM00050131
Forum URL: http://e2e.ti.com/support/development_tools/compiler/f/343/t/338470.aspx
Found In Release: ARM_15.12.0.LTS
C2000_16.9.0.LTS
C6000_8.2.0
C2000_18.1.0.LTS
C2000_6.4.0B1
C6000_8.3.0
ARM_18.12.0.LTS
MSP430_15.12.0.LTS
PRU_2.3.0
PRU_2.2.0
PRU_2.1.0
C6000_7.4.7
ARM_18.1.0.LTS
MSP430_18.1.0.LTS
ARM_16.9.0.LTS
C2000_15.12.0.LTS
MSP430_4.4.0B1
C6000_8.1.0B1
MSP430_18.12.0.LTS
ARM_5.2.0B1
MSP430_16.9.0.LTS
C2000_18.12.0.LTS
ARP32_1.0.0B1
Fix In Release: C2000_18.1.5.LTS
C6000_8.3.2
PRU_2.3.2
C2000_18.12.1.LTS
MSP430_18.1.5.LTS
ARM_18.1.5.LTS
MSP430_18.12.1.LTS
ARM_18.12.1.LTS
ARM_16.9.11.LTS
C6000_8.2.6
C6000_8.1.9
C2000_16.9.11.LTS
MSP430_16.9.11.LTS
Workaround: Completely specify every aggregate member in the initializer, or do not provide an initializer at all and instead populate each field with a statement.
Release Notes: Function local non-static aggregate (array or struct) variables which are initialized to zero, or with an initializer that incompletely specifies all of the aggregate members, will be converted to static scope (global) objects. This is wrong; each time the function is entered, there should be a fresh copy of the variable.

 Description   

Local struct with non-constant initializer treated as static scope variable


Generated at Sat Dec 13 11:35:54 CST 2025 using Jira 10.3.7#10030007-sha1:a563685562f94d165eb4e158cfb2a142338d8c54.