Uploaded image for project: 'Embedded Software & Tools'
  1. Embedded Software & Tools
  2. EXT_EP-7786

Compiler generates internal error: illegal initialization or segmentation fault

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • Code Generation Tools
    • CODEGEN-357
    • SDSCM00042344
    • Hide
      ARM_15.12.0.LTS
       ARP32_1.0.0B1
       C2000_15.12.0.LTS
      Show
      ARM_15.12.0.LTS  ARP32_1.0.0B1  C2000_15.12.0.LTS
    • Hide
      ARP32_1.0.2
       C6000_7.4.4
      Show
      ARP32_1.0.2  C6000_7.4.4
    • Hide
      The seg fault can be worked around if the nested designated initializer is removed:

      static struct cfg config[] =
      {
          // the first definition makes the segmentation fault. Comment it and everything is fine.
          { .module_id = MODULE_1,
            .param_length = sizeof(struct module_1_params),
            .param = (struct module_1_params []){{1}} /* remove this designated initializer */
          },

          { .module_id = MODULE_2,
            .param_length = 5,
            .param = (int[]){0,1,2,3,4}
          },

          { .module_id = MODULE_3,
            .param_length = 2,
            .param = (int[]){0,1}
          }

      };
      Show
      The seg fault can be worked around if the nested designated initializer is removed: static struct cfg config[] = {     // the first definition makes the segmentation fault. Comment it and everything is fine.     { .module_id = MODULE_1,       .param_length = sizeof(struct module_1_params),       .param = (struct module_1_params []){{1}} /* remove this designated initializer */     },     { .module_id = MODULE_2,       .param_length = 5,       .param = (int[]){0,1,2,3,4}     },     { .module_id = MODULE_3,       .param_length = 2,       .param = (int[]){0,1}     } };

      Compiler generates internal error: illegal initialization or segmentation fault

            syncuser TI User
            syncuser TI User
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: