Clear all local_symbol.lsy_flags
authorAlan Modra <alan@oc6313733251.ibm.com>
Mon, 18 May 2020 05:00:06 +0000 (14:30 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 19 May 2020 01:21:04 +0000 (10:51 +0930)
* symbols.c (local_symbol_make): Init all of lsy_flags.

gas/ChangeLog
gas/symbols.c

index 7fb6b5d0b4ba995e5de3b05faa45c4045a14d222..c73d02a5da5ce5bc9df98bd8ccd7f2c43448f7a5 100644 (file)
@@ -1,3 +1,7 @@
+2020-05-19  Alan Modra  <amodra@gmail.com>
+
+       * symbols.c (local_symbol_make): Init all of lsy_flags.
+
 2020-05-18  Alan Modra  <amodra@gmail.com>
 
        * symbols.c (resolve_symbol_value): Invoke LOCAL_SYMBOL_CHECK
index b1376a57b49584c648721bb4ad051ff96e57a20e..2fa752517383f1c92ee20f87f85fa92630bf9f4c 100644 (file)
@@ -327,14 +327,14 @@ local_symbol_make (const char *name, segT section, valueT val, fragS *frag)
 {
   const char *name_copy;
   struct local_symbol *ret;
+  struct symbol_flags flags = { .sy_local_symbol = 1, .sy_resolved = 0 };
 
   ++local_symbol_count;
 
   name_copy = save_symbol_name (name);
 
   ret = (struct local_symbol *) obstack_alloc (&notes, sizeof *ret);
-  ret->lsy_flags.sy_local_symbol = 1;
-  ret->lsy_flags.sy_resolved = 0;
+  ret->lsy_flags = flags;
   ret->lsy_name = name_copy;
   ret->lsy_section = section;
   local_symbol_set_frag (ret, frag);