[llvm-bugs] [Bug 40756] New: Compile error(Segmentation fault) occurs when -O2 or more is set

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Feb 18 02:17:56 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=40756

            Bug ID: 40756
           Summary: Compile error(Segmentation fault) occurs when -O2 or
                    more is set
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ueno.masakazu at jp.fujitsu.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

Created attachment 21487
  --> https://bugs.llvm.org/attachment.cgi?id=21487&action=edit
BUG REPORT(bug499-2a2a42.c, bug499-2a2a42.sh)

When compiling the following program(bug499.c) with -O2 or more, Segmentation
fault occurs and output the following message.

* Tail of error message
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-9: note: diagnostic msg: /tmp/bug499-2a2a42.c
clang-9: note: diagnostic msg: /tmp/bug499-2a2a42.sh
clang-9: note: diagnostic msg:

* source program (bug499.c)
#include <stdio.h>
int main () {
  int i=0,j=0;
  int v1=1,v2=2,v3=3;

  for(i=0;i<1;i++) {
    for(j=0; j<29; ++j) {
      v3 = (v1 + v3) *v1;
      v1=v2 * v3;
    }
    v2=1;
  }
  printf("%d %d %d \n",v1,v2,v3);

  return 0;
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190218/431769d5/attachment.html>


More information about the llvm-bugs mailing list