Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C front-end: ensure array type updates are consistent #7610

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

tautschnig
Copy link
Collaborator

We must not end up in a situation where the symbol's array type is different from the type applied to symbol expressions in code. With the previous approach, support-function generation would alter the type after typechecking of code had already been completed.

Fixes: #7608

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@codecov
Copy link

codecov bot commented Mar 23, 2023

Codecov Report

Attention: Patch coverage is 95.83333% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 78.24%. Comparing base (1ed7b2f) to head (02099c5).

Files Patch % Lines
src/ansi-c/ansi_c_language.cpp 94.11% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7610      +/-   ##
===========================================
- Coverage    78.38%   78.24%   -0.14%     
===========================================
  Files         1720     1720              
  Lines       187982   188328     +346     
  Branches     18474    18473       -1     
===========================================
+ Hits        147346   147360      +14     
- Misses       40636    40968     +332     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@peterschrammel peterschrammel removed their assignment Mar 27, 2023
@tautschnig tautschnig force-pushed the bugfixes/7608-array-size-nil branch 2 times, most recently from 0314f76 to e00eb77 Compare April 23, 2024 12:22
We must not end up in a situation where the symbol's array type is
different from the type applied to symbol expressions in code. With the
previous approach, support-function generation would alter the type
after typechecking of code had already been completed. Instead, do as
the C standard says: if the type is incomplete _at the end of a
translation unit_, the (implicit) initializer makes it a one-element
array.

Fixes: diffblue#7608
@tautschnig tautschnig force-pushed the bugfixes/7608-array-size-nil branch from e00eb77 to 02099c5 Compare April 24, 2024 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SSA conversion crash caused by extern array declaration
4 participants