[llvm-bugs] [Bug 40383] New: Broken incorrect fix-it for -Wc++11-narrowing

2019-01-20 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=40383

Bug ID: 40383
   Summary: Broken incorrect fix-it for -Wc++11-narrowing
   Product: clang
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Frontend
  Assignee: unassignedclangb...@nondot.org
  Reporter: lebedev...@gmail.com
CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
richard-l...@metafoo.co.uk

https://godbolt.org/z/DkP1ns

struct S {
using value_type = char;
value_type k;
S (value_type k_) : k(k_){};
};

S test(int i) {
return {i};
}

:8:13: error: non-constant-expression cannot be narrowed from type
'int' to 'S::value_type' (aka 'char') in initializer list [-Wc++11-narrowing]

return {i};

^

:8:13: note: insert an explicit cast to silence this issue

return {i};

^

static_cast( )

1 error generated.

Compiler returned: 1


static_cast( )  <- that is clearly wrong.
It should be something like static_cast( )

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 31899] MachineBranchProb.ll:24:10: error: expected string not found in input

2019-01-20 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=31899

Dylan McKay  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from Dylan McKay  ---
Since fixed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 31338] Assertion failed: (InVals.size() == Ins.size() && "LowerFormalArguments didn't emit the correct number of values!")

2019-01-20 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=31338

Dylan McKay  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from Dylan McKay  ---
This has since been fixed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 31155] META: Fix all of the generic CodeGen tests

2019-01-20 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=31155
Bug 31155 depends on bug 31338, which changed state.

Bug 31338 Summary: Assertion failed: (InVals.size() == Ins.size() && 
"LowerFormalArguments didn't emit the correct number of values!")
https://bugs.llvm.org/show_bug.cgi?id=31338

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 40384] New: __cxx11 shouldn't be displayed

2019-01-20 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=40384

Bug ID: 40384
   Summary: __cxx11 shouldn't be displayed
   Product: clang
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: C++
  Assignee: unassignedclangb...@nondot.org
  Reporter: j...@jguk.org
CC: blitzrak...@gmail.com, dgre...@apple.com,
erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
richard-l...@metafoo.co.uk

I know __cxx11 was introduced as ABI changed, but it doesn't need to be shown
to users. Can that be eliminated?

#include 
int main()
{
std::string str("hello ");
std::size_t s = str.find(" ");
str.erase(s, str.end());
}


Current output from my clang 6, which appears similar to clang trunk on
godbolt.org


$ clang++ -Wall -o stl_string stl_string.cpp
stl_string.cpp:7:9: error: no matching member function for call to 'erase'
str.erase(s, str.end());
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h:1789:7:
note: candidate
  function not viable: no known conversion from
'std::__cxx11::basic_string,
  std::allocator >::iterator' (aka '__normal_iterator >')
  to 'std::__cxx11::basic_string,
std::allocator >::size_type'
  (aka 'unsigned long') for 2nd argument
  erase(size_type __pos = 0, size_type __n = npos)
  ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h:1827:7:
note: candidate
  function not viable: no known conversion from 'std::size_t' (aka
'unsigned long') to
  'std::__cxx11::basic_string,
std::allocator >::__const_iterator' (aka
  '__normal_iterator >') for
1st argument
  erase(__const_iterator __first, __const_iterator __last)
  ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h:1808:7:
note: candidate
  function not viable: requires single argument '__position', but 2
arguments were provided
  erase(__const_iterator __position)
  ^
1 error generated.

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 31339] Assertion failed: (Opt.getValue() && "non gc managed base pointer found in statepoint")

2019-01-20 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=31339

Dylan McKay  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from Dylan McKay  ---
Since fixed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 31155] META: Fix all of the generic CodeGen tests

2019-01-20 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=31155
Bug 31155 depends on bug 31339, which changed state.

Bug 31339 Summary: Assertion failed: (Opt.getValue() && "non gc managed base 
pointer found in statepoint")
https://bugs.llvm.org/show_bug.cgi?id=31339

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 31328] Fix CodeGen/AVR/high-pressure-on-ptrregs.ll

2019-01-20 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=31328

Dylan McKay  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from Dylan McKay  ---
Since fixed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 40385] New: use absolute include paths

2019-01-20 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=40385

Bug ID: 40385
   Summary: use absolute include paths
   Product: clang
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: C++
  Assignee: unassignedclangb...@nondot.org
  Reporter: j...@jguk.org
CC: blitzrak...@gmail.com, dgre...@apple.com,
erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
richard-l...@metafoo.co.uk

G++ doesn't show such long paths, but clang++ does

It would be best if these could be converted to absolute paths immediately with
realpath() so that only absolute paths appeared in errors/warnings later in
output.

Observed:
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h

Expected:
/usr/include/c++/8/bits/basic_string.h



Example program :-


#include 
int main()
{
std::string str("hello ");
std::size_t s = str.find(" ");
str.erase(s, str.end());
}


Current output from my clang 6, which appears similar to clang trunk on
godbolt.org


$ clang++ -Wall -o stl_string stl_string.cpp
stl_string.cpp:7:9: error: no matching member function for call to 'erase'
str.erase(s, str.end());
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h:1789:7:
note: candidate
  function not viable: no known conversion from
'std::__cxx11::basic_string,
  std::allocator >::iterator' (aka '__normal_iterator >')
  to 'std::__cxx11::basic_string,
std::allocator >::size_type'
  (aka 'unsigned long') for 2nd argument
  erase(size_type __pos = 0, size_type __n = npos)
  ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h:1827:7:
note: candidate
  function not viable: no known conversion from 'std::size_t' (aka
'unsigned long') to
  'std::__cxx11::basic_string,
std::allocator >::__const_iterator' (aka
  '__normal_iterator >') for
1st argument
  erase(__const_iterator __first, __const_iterator __last)
  ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h:1808:7:
note: candidate
  function not viable: requires single argument '__position', but 2
arguments were provided
  erase(__const_iterator __position)
  ^
1 error generated.

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 40386] New: Crash on cyclic struct

2019-01-20 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=40386

Bug ID: 40386
   Summary: Crash on cyclic struct
   Product: tools
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: llc
  Assignee: unassignedb...@nondot.org
  Reporter: lamm...@in.tum.de
CC: llvm-bugs@lists.llvm.org

Created attachment 21357
  --> https://bugs.llvm.org/attachment.cgi?id=21357&action=edit
ll file to trigger bug

llc core-dumps when a cyclic struct is used. Expectation would be to get a
well-defined error message. 

Reproduction of bug:

> llc -O0 cyclic_type.ll 
[...]
Stack dump:
0.  Program arguments: llc -O0 cyclic_type.ll 
1.  Running pass 'Function Pass Manager' on module
'cyclic_type.ll'.
2.  Running pass 'X86 DAG->DAG Instruction Selection' on function '
@f'
Floating point exception (core dumped)

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] Issue 12546 in oss-fuzz: llvm/clang-fuzzer: Stack-overflow in processTypeAttrs

2019-01-20 Thread ClusterFuzz-External via monorail via llvm-bugs


Comment #1 on issue 12546 by ClusterFuzz-External: llvm/clang-fuzzer:  
Stack-overflow in processTypeAttrs

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12546#c1

ClusterFuzz has detected this issue as fixed in range  
201901190417:201901200414.


Detailed report: https://oss-fuzz.com/testcase?key=5689796633034752

Project: llvm
Fuzzer: libFuzzer_llvm_clang-fuzzer
Fuzz target binary: clang-fuzzer
Job Type: libfuzzer_asan_llvm
Platform Id: linux

Crash Type: Stack-overflow
Crash Address: 0x7ffda7cfeae0
Crash State:
  processTypeAttrs
  ConvertDeclSpecToType
  GetDeclSpecTypeForDeclarator

Sanitizer: address (ASAN)

Regressed:  
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=201808220126:201808221503
Fixed:  
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=201901190417:201901200414


Reproducer Testcase:  
https://oss-fuzz.com/download?testcase_id=5689796633034752


See https://github.com/google/oss-fuzz/blob/master/docs/reproducing.md for  
instructions to reproduce this bug locally.


If you suspect that the result above is incorrect, try re-doing that job on  
the test case report page.


--
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] Issue 12270 in oss-fuzz: llvm/llvm-dwarfdump-fuzzer: Timeout in llvm_llvm-dwarfdump-fuzzer

2019-01-20 Thread ClusterFuzz-External via monorail via llvm-bugs


Comment #2 on issue 12270 by ClusterFuzz-External:  
llvm/llvm-dwarfdump-fuzzer: Timeout in llvm_llvm-dwarfdump-fuzzer

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12270#c2

ClusterFuzz has detected this issue as fixed in range  
201901190417:201901200414.


Detailed report: https://oss-fuzz.com/testcase?key=5684545240694784

Project: llvm
Fuzzer: libFuzzer_llvm_llvm-dwarfdump-fuzzer
Fuzz target binary: llvm-dwarfdump-fuzzer
Job Type: libfuzzer_asan_llvm
Platform Id: linux

Crash Type: Timeout (exceeds 25 secs)
Crash Address:
Crash State:
  llvm_llvm-dwarfdump-fuzzer

Sanitizer: address (ASAN)

Regressed:  
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=201803210523:201803220523
Fixed:  
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=201901190417:201901200414


Reproducer Testcase:  
https://oss-fuzz.com/download?testcase_id=5684545240694784


See https://github.com/google/oss-fuzz/blob/master/docs/reproducing.md for  
instructions to reproduce this bug locally.


If you suspect that the result above is incorrect, try re-doing that job on  
the test case report page.


--
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] Issue 12504 in oss-fuzz: llvm/clang-fuzzer: Timeout in llvm_clang-fuzzer

2019-01-20 Thread ClusterFuzz-External via monorail via llvm-bugs


Comment #2 on issue 12504 by ClusterFuzz-External: llvm/clang-fuzzer:  
Timeout in llvm_clang-fuzzer

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12504#c2

ClusterFuzz has detected this issue as fixed in range  
201901190417:201901200414.


Detailed report: https://oss-fuzz.com/testcase?key=5749447739310080

Project: llvm
Fuzzer: libFuzzer_llvm_clang-fuzzer
Fuzz target binary: clang-fuzzer
Job Type: libfuzzer_asan_llvm
Platform Id: linux

Crash Type: Timeout (exceeds 25 secs)
Crash Address:
Crash State:
  llvm_clang-fuzzer

Sanitizer: address (ASAN)

Fixed:  
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=201901190417:201901200414


Reproducer Testcase:  
https://oss-fuzz.com/download?testcase_id=5749447739310080


See https://github.com/google/oss-fuzz/blob/master/docs/reproducing.md for  
instructions to reproduce this bug locally.


If you suspect that the result above is incorrect, try re-doing that job on  
the test case report page.


--
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] Issue 12270 in oss-fuzz: llvm/llvm-dwarfdump-fuzzer: Timeout in llvm_llvm-dwarfdump-fuzzer

2019-01-20 Thread ClusterFuzz-External via monorail via llvm-bugs

Updates:
Labels: ClusterFuzz-Verified
Status: Verified

Comment #3 on issue 12270 by ClusterFuzz-External:  
llvm/llvm-dwarfdump-fuzzer: Timeout in llvm_llvm-dwarfdump-fuzzer

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12270#c3

ClusterFuzz testcase 5684545240694784 is verified as fixed, so closing  
issue as verified.


If this is incorrect, please file a bug on  
https://github.com/google/oss-fuzz/issues/new


--
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] Issue 12546 in oss-fuzz: llvm/clang-fuzzer: Stack-overflow in processTypeAttrs

2019-01-20 Thread ClusterFuzz-External via monorail via llvm-bugs

Updates:
Labels: ClusterFuzz-Verified
Status: Verified

Comment #2 on issue 12546 by ClusterFuzz-External: llvm/clang-fuzzer:  
Stack-overflow in processTypeAttrs

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12546#c2

ClusterFuzz testcase 5689796633034752 is verified as fixed, so closing  
issue as verified.


If this is incorrect, please file a bug on  
https://github.com/google/oss-fuzz/issues/new


--
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] Issue 12504 in oss-fuzz: llvm/clang-fuzzer: Timeout in llvm_clang-fuzzer

2019-01-20 Thread ClusterFuzz-External via monorail via llvm-bugs

Updates:
Labels: ClusterFuzz-Verified
Status: Verified

Comment #3 on issue 12504 by ClusterFuzz-External: llvm/clang-fuzzer:  
Timeout in llvm_clang-fuzzer

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12504#c3

ClusterFuzz testcase 5749447739310080 is verified as fixed, so closing  
issue as verified.


If this is incorrect, please file a bug on  
https://github.com/google/oss-fuzz/issues/new


--
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 40387] New: [Optimization] Enable switch lookup tables in the AVR backend

2019-01-20 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=40387

Bug ID: 40387
   Summary: [Optimization] Enable switch lookup tables in the AVR
backend
   Product: libraries
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Backend: AVR
  Assignee: unassignedb...@nondot.org
  Reporter: m...@dylanmckay.io
CC: llvm-bugs@lists.llvm.org

One example of a switch lookup table is the switch lookup table generated in
SimplifyCFG.

On AVR, a switch lookup table can only be placed into and loaded from program
memory if the MCU supports the LPM instruction. Otherwise, the table must be
loaded from RAM.

At the moment, switch lookup tables are broken on AVR.

There are two issues:

* https://github.com/avr-rust/rust/issues/47
* https://github.com/avr-rust/rust/issues/69

I have since disabled switch lookup tables on AVR to workaround these bugs.

We should get switch lookup tables working on AVR to enable more efficient
code.

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 40388] New: Fix the pointer register class used by LDWRdPtr from PTRREGS to PTRDISPREGS

2019-01-20 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=40388

Bug ID: 40388
   Summary: Fix the pointer register class used by LDWRdPtr from
PTRREGS to PTRDISPREGS
   Product: libraries
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Backend: AVR
  Assignee: unassignedb...@nondot.org
  Reporter: m...@dylanmckay.io
CC: llvm-bugs@lists.llvm.org

LDWRdPtr expands to LDDRdPtrQ, which requires a PTRDISPREGS class. This means
that if the X register is ever allocated, the LDDRdPtrQ will be an illegal
instruction and will hit an assertion error at machine code generation time.

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs