Skip to content

Fix header array assignment bug#5567

Open
nishant11-tchy wants to merge 3 commits intop4lang:mainfrom
nishant11-tchy:fix-header-array-bug
Open

Fix header array assignment bug#5567
nishant11-tchy wants to merge 3 commits intop4lang:mainfrom
nishant11-tchy:fix-header-array-bug

Conversation

@nishant11-tchy
Copy link
Copy Markdown

Summary

Fix compiler bug when assigning from a header array element to a header.

Problem

Assignment like:
hdr.eth_hdr = hdr_arr[0];

was not handled correctly during midend transformation.

Fix

  • Corrected handling of header array indexing
  • Ensured proper lowering behavior

Testing

  • Verified behavior with test case

Reference

Closes #5560

Signed-off-by: nishant11-tchy <nishantnnnn11@gmail.com>
@nishant11-tchy
Copy link
Copy Markdown
Author

Hi, I’ve worked on fixing the header array to header assignment issue.

I’ve updated the handling in the midend to correctly process assignments like:
hdr.eth_hdr = hdr_arr[0];

Please let me know if any changes or improvements are needed.

Thanks!

Signed-off-by: nishant11-tchy <nishantnnnn11@gmail.com>
@nishant11-tchy
Copy link
Copy Markdown
Author

Hi, I’ve updated the PR and ensured the changes are minimal and do not affect other transformations.

All CI checks are now passing successfully.

Please let me know if any further improvements are needed. Thanks!

@jafingerhut
Copy link
Copy Markdown
Contributor

Hi, I’ve updated the PR and ensured the changes are minimal and do not affect other transformations.

All CI checks are now passing successfully.

Please let me know if any further improvements are needed. Thanks!

There are 0 changed files in this PR as of right now (after 2 commits), so it is expected that all the tests will pass :-)

@fruffy fruffy added the core Topics concerning the core segments of the compiler (frontend, midend, parser) label Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Topics concerning the core segments of the compiler (frontend, midend, parser)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DPDK/PNA] Compiler Bug when reading from a header array into an inout parameter

3 participants