[llvm-bugs] [Bug 38325] New: decltype for lambda capture gives wrong type

2018-07-26 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=38325

Bug ID: 38325
   Summary: decltype for lambda capture gives wrong type
   Product: clang
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Frontend
  Assignee: unassignedclangb...@nondot.org
  Reporter: antosh...@gmail.com
CC: llvm-bugs@lists.llvm.org

According to my reading of the http://eel.is/c++draft/expr.prim.id.unqual#2 the
following code should compile:

#include 
#include 

constexpr std::true_type  is_const(int const &)   { return {}; }
constexpr std::false_type is_const(int &) { return {}; }

int main() {
  int x = 0;
  [y = x, x] {
const int z = 0;
assert(is_const(x)); // OK
assert(is_const(y)); // OK
assert(is_const(z)); // OK

static_assert(!decltype(is_const(x))::value, "");
static_assert(decltype(is_const(y))::value, ""); // Fails (OK on GCC)
static_assert(decltype(is_const(z))::value, "");

static_assert(!std::is_const::value, "");
static_assert(std::is_const::value, ""); // Fails (OK on GCC)
static_assert(std::is_const::value, "");
  } ();
}

However, two lines marked with "Fails (OK on GCC)" do not pass the asserts.

-- 
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 38326] New: init_priority(65535) behavior differs from g++

2018-07-26 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=38326

Bug ID: 38326
   Summary: init_priority(65535) behavior differs from g++
   Product: clang
   Version: 5.0
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: C++
  Assignee: unassignedclangb...@nondot.org
  Reporter: stephane.zimmerm...@trust-in-soft.com
CC: dgre...@apple.com, llvm-bugs@lists.llvm.org

Created attachment 20602
  --> https://bugs.llvm.org/attachment.cgi?id=20602&action=edit
Test case

The following program:
extern "C" int printf(const char *, ...);

struct Foo {
Foo(int x) { printf("INIT: %d\n", x); }
};

Foo f(1);
Foo f2(2);
Foo f3(3);

__attribute__((init_priority(101)))
Foo g0(101);

__attribute__((init_priority(65534)))
Foo g(65534);

__attribute__((init_priority(65535)))
Foo h(65535);

int main(void) {
return 0;
}

- when compiled with clang++ (5.0.0) displays:
INIT: 101
INIT: 65534
INIT: 65535
INIT: 1
INIT: 2
INIT: 3

- when compiled with g++ (5.4.0) displays:
INIT: 101
INIT: 65534
INIT: 1
INIT: 2
INIT: 3
INIT: 65535

g++ seems to consider that init_priority 655535 happens after standard dynamic
initialization.

-- 
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 38327] New: Subtract stack pointer instead of push

2018-07-26 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=38327

Bug ID: 38327
   Summary: Subtract stack pointer instead of push
   Product: libraries
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Backend: X86
  Assignee: unassignedb...@nondot.org
  Reporter: david.bolvan...@gmail.com
CC: llvm-bugs@lists.llvm.org

Code:

int is_enabled(void);


int tobool(void) {
return !!is_enabled();
}

int tobool2(void) {
if(is_enabled())
return 9;
return 4;
}

Clang -O3:
tobool: # @tobool
pushrax
callis_enabled
xor ecx, ecx
testeax, eax
setne   cl
mov eax, ecx
pop rcx
ret
tobool2:# @tobool2
pushrax
callis_enabled
xor ecx, ecx
testeax, eax
setne   cl
lea eax, [rcx + 4*rcx]
add eax, 4
pop rcx
ret

GCC avoid push, it uses sub rsp, 8.
tobool:
sub rsp, 8
callis_enabled
testeax, eax
setne   al
add rsp, 8
movzx   eax, al
ret
tobool2:
sub rsp, 8
callis_enabled
cmp eax, 1
sbb eax, eax
add rsp, 8
and eax, -5
add eax, 9
ret


Maybe it could be worth (less instructions, register pressure) to follow GCC
decision, I think.

-- 
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 38328] New: clang-format crash inside SourceManager on malformed UTF file.

2018-07-26 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=38328

Bug ID: 38328
   Summary: clang-format crash inside SourceManager on malformed
UTF file.
   Product: clang
   Version: unspecified
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: Formatter
  Assignee: unassignedclangb...@nondot.org
  Reporter: p...@kantaka.co.uk
CC: djas...@google.com, kli...@google.com,
llvm-bugs@lists.llvm.org

Created attachment 20603
  --> https://bugs.llvm.org/attachment.cgi?id=20603&action=edit
clang-format < clang-format.crash results in a segfault.

clang-format crashes on a file with bad UTF codepoints. The crash itself seems
to be inside the libclang SourceManager however, which is a little weird. I've
submitted against the Formatter, but it might be a libclang SourceManager bug
too.

cheers, Phil

-- 
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 36787] [MemorySSA] Assertion `&*ALI == *AAI && "Not the same accesses in the same order"' failed

2018-07-26 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=36787

Alexandros Lamprineas  changed:

   What|Removed |Added

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

--- Comment #2 from Alexandros Lamprineas  ---
Fixed by rL337674. Resolving.

-- 
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 37445] [GVNHoist] Assertion `dominates(MP, U) && "Memory PHI does not dominate it's uses"' failed.

2018-07-26 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=37445

Alexandros Lamprineas  changed:

   What|Removed |Added

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

--- Comment #3 from Alexandros Lamprineas  ---
Fixed by rL337680. Resolving.

-- 
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 38329] New: Mismatch between SVN users and Phabricator users can cause revisions on Phabricator to be attributed to the wrong person

2018-07-26 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=38329

Bug ID: 38329
   Summary: Mismatch between SVN users and Phabricator users can
cause revisions on Phabricator to be attributed to the
wrong person
   Product: Phabricator
   Version: unspecified
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: All Bugs
  Assignee: unassignedb...@nondot.org
  Reporter: mcastelluc...@mozilla.com
CC: llvm-bugs@lists.llvm.org

My SVN username is marco, my username on Phabricator is marco-c. Marco Romano's
username on Phabricator is marco.
My commits on Phabricator are attributed to Marco Romano, e.g.
https://reviews.llvm.org/rL338013.

-- 
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 38330] New: Missing vectorization for step 4

2018-07-26 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=38330

Bug ID: 38330
   Summary: Missing vectorization for step 4
   Product: libraries
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Scalar Optimizations
  Assignee: unassignedb...@nondot.org
  Reporter: david.bolvan...@gmail.com
CC: llvm-bugs@lists.llvm.org

Hello,

Code:
int vec_step_four(int *restrict A, int *restrict B, int *restrict C, int N) {
int sum = 0;
for (int i = 0; i < N; i += 4) {
C[i] = A[i] + B[i];
sum += C[i];
}

return sum;
}

Clang -O3 currently cannot vectorize this loop.
https://godbolt.org/g/NSHVVL

-- 
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 9592 in oss-fuzz: llvm/clang-format-fuzzer: Stack-overflow in clang::format::TokenAnnotator::annotate

2018-07-26 Thread ClusterFuzz-External via monorail via llvm-bugs

Status: New
Owner: 
CC: k...@google.com, masc...@google.com, jdevlieg...@apple.com,  
igm...@gmail.com, eney...@google.com, llvm-b...@lists.llvm.org,  
j...@chromium.org, v...@apple.com, mitchphi...@outlook.com,  
xpl...@gmail.com, akils...@apple.com
Labels: ClusterFuzz Stability-Memory-AddressSanitizer Reproducible  
Engine-libfuzzer Proj-llvm Reported-2018-07-26

Type: Bug

New issue 9592 by ClusterFuzz-External: llvm/clang-format-fuzzer:  
Stack-overflow in clang::format::TokenAnnotator::annotate

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

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

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

Crash Type: Stack-overflow
Crash Address: 0x7ffee63a0f80
Crash State:
  clang::format::TokenAnnotator::annotate

Sanitizer: address (ASAN)

Regressed:  
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=201709130450:201709140449


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


Issue filed automatically.

See https://github.com/google/oss-fuzz/blob/master/docs/reproducing.md for  
more information.


When you fix this bug, please
  * mention the fix revision(s).
  * state whether the bug was a short-lived regression or an old bug in any  
stable releases.

  * add any other useful information.
This information can help downstream consumers.

If you need to contact the OSS-Fuzz team with a question, concern, or any  
other feedback, please file an issue at  
https://github.com/google/oss-fuzz/issues.


--
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 38312] two errors from unrecognized command

2018-07-26 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=38312

Raphael Isemann  changed:

   What|Removed |Added

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

--- Comment #1 from Raphael Isemann  ---
Thanks! Fixed in r338040

-- 
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 38297] llvm-dwarfdump: Verification failure when using DWARF v5 (parsing a range list table: section is not large enough to contain a .debug_rnglists table length at offset 0x0)

2018-07-26 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=38297

Wolfgang Pieb  changed:

   What|Removed |Added

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

--- Comment #10 from Wolfgang Pieb  ---
This has been fixed with r337993.

-- 
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 38331] New: -Wfloat-equal does not catch comparision with constant value

2018-07-26 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=38331

Bug ID: 38331
   Summary: -Wfloat-equal does not catch comparision with constant
value
   Product: clang
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Static Analyzer
  Assignee: dcough...@apple.com
  Reporter: david.bolvan...@gmail.com
CC: llvm-bugs@lists.llvm.org

Code compiled with -Wfloat-equal:
bool compare (const float lhs, const float rhs)
{
  return lhs == rhs; // Clang warns
}

bool compare2 (const float lhs, const float rhs)
{
  return lhs == 1.0; // No warning from Clang, GCC warns
}

-- 
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 30734] Building with CFLAGS=-DBUILD_MEMORY=1 (FIRST_TOUCH) does not export non-static __kmp_ft_page_allocate() function into a final library

2018-07-26 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=30734

Jonas Hahnfeld  changed:

   What|Removed |Added

 Fixed By Commit(s)||r338052
 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #11 from Jonas Hahnfeld  ---
Removed in r338052

-- 
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 38183] Crash when trying to find the source file/line for an undefined symbol, due to PendingComdat

2018-07-26 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=38183

Martin Storsjö  changed:

   What|Removed |Added

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

--- Comment #5 from Martin Storsjö  ---
Fixed in SVN r338064.

-- 
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 38251] Duplicate profiling symbols on Windows

2018-07-26 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=38251

Reid Kleckner  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
 Fixed By Commit(s)||r338082

--- Comment #12 from Reid Kleckner  ---
Sorry for the noise, this ended up being really simple, r338082 has the fix.

-- 
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 38295] Breaking difference between __FUNCSIG__ in Clang and MSVC

2018-07-26 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=38295

Reid Kleckner  changed:

   What|Removed |Added

 Fixed By Commit(s)||r338083
 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #3 from Reid Kleckner  ---
Committed the work around in r338083.

-- 
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