Hi,

I'm working with thud branch and have run into a bug in gcc. I would like help how to proceed with this.

Compiling the following C code gives Segmentation fault in gcc:

#include <stdio.h>
#include <string.h>
#include <stdint.h>

int main(void)
{
    const int32_t BUFFER_MAX_LENGTH = 4096*1024;
    char buffer[BUFFER_MAX_LENGTH];

    if (strncmp(&buffer[8], "ABC", 3) == 0)
        return 1;

    return 0;
}


Error:

| during RTL pass: expand
| 
/work/yocto/metrum-r3/build/tmp/work/armv7at2hf-neon-poky-linux-gnueabi/compiler-test/1.0-r0/work/git/tmp/strncmp.c:
 In function 'main':
| 
/work/yocto/metrum-r3/build/tmp/work/armv7at2hf-neon-poky-linux-gnueabi/compiler-test/1.0-r0/work/git/tmp/strncmp.c:16:6:
 internal compiler error: Segmentation fault
|   if (strncmp(&buffer[8], "ABC", 3) == 0)
|       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Please submit a full bug report,
| with preprocessed source if appropriate.


I would like this fixed in thud branch and took a quick look in gcc repo for solutions. I had no luck finding anything useful. Anyone seeing this before? Anyone having suggestion how to proceed? Shall I create a bugzilla in Yocto?

Thanks,
/Peter
-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to