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

ImportC: Postfix ++ on a bitfield causes a segfault #4761

Open
ArthaTi opened this issue Sep 26, 2024 · 0 comments
Open

ImportC: Postfix ++ on a bitfield causes a segfault #4761

ArthaTi opened this issue Sep 26, 2024 · 0 comments

Comments

@ArthaTi
Copy link
Contributor

ArthaTi commented Sep 26, 2024

Reduced example:

#include <stdint.h>
#include <stdbool.h>

typedef uint16_t TSStateId;
typedef struct {
  TSStateId state;
  uint16_t production_id;
  uint8_t child_index: 7;
  bool done: 1;
} AnalysisSubgraphNode;

int main() {

    AnalysisSubgraphNode successor = {
      .state = 0,
      .child_index = 0,
    };

    successor.child_index++;

}

LDC version:

LDC - the LLVM D compiler (1.39.0):
  based on DMD v2.109.1 and LLVM 18.1.8
  built with LDC - the LLVM D compiler (1.38.0)
  Default target: x86_64-pc-linux-gnu
  Host CPU: znver1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant