| Issue |
203709
|
| Summary |
[clang][bytecode] error: initializer element is not a compile-time constant with -fexperimental-new-constant-interpreter
|
| Labels |
clang
|
| Assignees |
|
| Reporter |
Andarwinux
|
https://godbolt.org/z/3YarozT4r
```c
typedef struct AVOption {
} AVOption;
typedef struct AVClass {
const struct AVOption *option;
} AVClass;
extern const AVOption ff_ac3_enc_options[];
const AVClass eac3enc_class = {
.option = &ff_ac3_enc_options[2]
};
```
```
<source>:12:19: error: initializer element is not a compile-time constant
12 | .option = &ff_ac3_enc_options[2]
| ^~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Compiler returned: 1
```
gcc or clang without -fexperimental-new-constant-interpreter can compile it successfully, so it looks like a bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs