Conditional expression containing GNU statement expression crashes compiler

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Not Prioritized

      Conditional expression containing GNU statement expression crashes parser.

      Attached test case contains the following:

      if (
      	({
      		uint16_t my_array[5]= {1,2,3,4,5};
      
      		//(do_something_with_array(my_array, 5) != 5);
      		(do_something_with_array((uint16_t[]){1,2,3,4,5}, 5) != 5);
      	})
          )
      {
      	// return with error.
      	return 1;
      } 

      When compiled...

      cl2000 -c test.c

      "test.c", line 10: warning: variable "my_array" was declared but never referenced
      "test.c", line 27: internal error: assertion failed at: "../../master/ANSI/lower_gcc.c", line 701
      
      1 catastrophic error detected in the compilation of "test.c".Compilation aborted.
      INTERNAL ERROR: acia2000 had an internal inconsistency and aborted                  
      while processing function main file test.c line 27

            Assignee:
            TI User
            Reporter:
            TI User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Connection: Intermediate to External PROD System
                EXTSYNC-6839 - Conditional expression containing G...
                SYNCHRONIZED
                • Last Sync Date: