Landing: 75244f0e73b5

Project / Subsystem

gcc / testsuite

Date

2026-05-07

Author

Jakub Jelinek

Commit

75244f0e73b51d8268052b8d18935ca774f00060

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
testsuite
patch_id
commit_hash
75244f0e73b51d8268052b8d18935ca774f00060
source_type
github
headline
Testsuite: Correctly initialize struct in divide-by-zero test.
tldr
Fixes the gcc.dg/analyzer/divide-by-zero-6.c test by ensuring the struct is fully initialized on all architectures.
author
Jakub Jelinek
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • testsuite
  • analyzer
  • divide by zero
  • initialization
discussion_id_link
bugzilla_pr
date
2026-05-07T00:00:00.000Z

This commit fixes a test case (gcc.dg/analyzer/divide-by-zero-6.c) that was failing intermittently due to incorrect struct initialization. The test used memset with sizeof (f) where f was a pointer, which only cleared part of the structure on 32-bit architectures, leading to uninitialized values instead of the intended division by zero. The fix uses sizeof (*f) to clear the entire structure.