File tree Expand file tree Collapse file tree 10 files changed +89
-2
lines changed
regression/goto-instrument Expand file tree Collapse file tree 10 files changed +89
-2
lines changed Original file line number Diff line number Diff line change 1- KNOWNBUG
1+ CORE
22main.c
33--show-symbol-table
4- ^Type\.*: struct struct_tag_name$
4+ ^Type\.*: const struct struct_tag_name$
55^Type\.*: const double$
66^EXIT=0$
77^SIGNAL=0$
Original file line number Diff line number Diff line change 1+
2+ int main ()
3+ {
4+ const struct struct_tag_name {
5+ int x ;
6+ float y ;
7+ } my_struct_var = {.x = 1 , .y = 3.15 };
8+ const double z = 4 ;
9+ return 0 ;
10+ }
Original file line number Diff line number Diff line change 1+ CORE
2+ main.c
3+ --show-symbol-table
4+ ^Type\.*: const struct struct_tag_name$
5+ ^Type\.*: const double$
6+ ^EXIT=0$
7+ ^SIGNAL=0$
8+ --
9+ ^warning: ignoring
Original file line number Diff line number Diff line change 1+
2+ struct struct_tag_name
3+ {
4+ int x ;
5+ float y ;
6+ };
7+
8+ int main ()
9+ {
10+ const struct struct_tag_name my_struct_var = {.x = 1 , .y = 3.15 };
11+ const double z = 4 ;
12+ return 0 ;
13+ }
Original file line number Diff line number Diff line change 1+ CORE
2+ main.c
3+ --dump-c
4+ ^\s*const struct struct_tag_name my_struct_var
5+ ^\s*const double z
6+ ^EXIT=0$
7+ ^SIGNAL=0$
8+ --
9+ ^warning: ignoring
Original file line number Diff line number Diff line change 1+
2+ union union_tag_name
3+ {
4+ int x ;
5+ float y ;
6+ };
7+
8+ int main ()
9+ {
10+ const union union_tag_name my_union_var = {.y = 3.15 };
11+ const double z = 4 ;
12+ return 0 ;
13+ }
Original file line number Diff line number Diff line change 1+ CORE
2+ main.c
3+ --show-symbol-table
4+ ^Type\.*: const union union_tag_name$
5+ ^Type\.*: const double$
6+ ^EXIT=0$
7+ ^SIGNAL=0$
8+ --
9+ ^warning: ignoring
Original file line number Diff line number Diff line change 1+
2+ struct struct_tag_name
3+ {
4+ int x ;
5+ float y ;
6+ };
7+
8+ int main ()
9+ {
10+ volatile struct struct_tag_name my_struct_var = {.x = 1 , .y = 3.15 };
11+ const double z = 4 ;
12+ return 0 ;
13+ }
Original file line number Diff line number Diff line change 1+ CORE
2+ main.c
3+ --show-symbol-table
4+ ^Type\.*: volatile struct struct_tag_name$
5+ ^Type\.*: const double$
6+ ^EXIT=0$
7+ ^SIGNAL=0$
8+ --
9+ ^warning: ignoring
Original file line number Diff line number Diff line change @@ -819,7 +819,9 @@ void c_typecheck_baset::typecheck_compound_type(struct_union_typet &type)
819819 symbol_type.add_source_location ()=type.source_location ();
820820 symbol_type.set_identifier (identifier);
821821
822+ c_qualifierst original_qualifiers (type);
822823 type.swap (symbol_type);
824+ original_qualifiers.write (type);
823825}
824826
825827/* ******************************************************************\
You can’t perform that action at this time.
0 commit comments