[llvm-bugs] [Bug 38406] [meta] 7.0.0 Release Blockers

2018-08-07 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=38406
Bug 38406 depends on bug 38432, which changed state.

Bug 38432 Summary: Merge r338569 into the 7.0 branch : AMDGPU: Allow 
fp32-denormals feature for r600 targets
https://bugs.llvm.org/show_bug.cgi?id=38432

   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 38432] Merge r338569 into the 7.0 branch : AMDGPU: Allow fp32-denormals feature for r600 targets

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

Hans Wennborg  changed:

   What|Removed |Added

 CC||h...@chromium.org
 Resolution|--- |FIXED
 Fixed By Commit(s)|r338569 |r338569 r339103
 Status|NEW |RESOLVED

--- Comment #2 from Hans Wennborg  ---
Merged in r339103.

-- 
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 5614 in oss-fuzz: llvm/clang-fuzzer: ASSERT: NextLocalOffset + TokLength + 1 > NextLocalOffset && NextLocalOffset + TokLength

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


Comment #5 on issue 5614 by ClusterFuzz-External: llvm/clang-fuzzer:  
ASSERT: NextLocalOffset + TokLength + 1 > NextLocalOffset &&  
NextLocalOffset + TokLength

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

ClusterFuzz has detected this issue as fixed in range  
201808060247:201808070243.


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

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

Crash Type: ASSERT
Crash Address:
Crash State:
  NextLocalOffset + TokLength + 1 > NextLocalOffset && NextLocalOffset +  
TokLength

  clang::SourceManager::createExpansionLocImpl
  clang::SourceManager::createMacroArgExpansionLoc

Sanitizer: address (ASAN)

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


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


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


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] [Bug 38406] [meta] 7.0.0 Release Blockers

2018-08-07 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=38406
Bug 38406 depends on bug 38433, which changed state.

Bug 38433 Summary: Merge r338610 into the 7.0 branch : AMDGPU/R600: Convert 
kernel param loads to use PARAM_I_ADDRESS
https://bugs.llvm.org/show_bug.cgi?id=38433

   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 38433] Merge r338610 into the 7.0 branch : AMDGPU/R600: Convert kernel param loads to use PARAM_I_ADDRESS

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

Hans Wennborg  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED
 Fixed By Commit(s)|r338610 |r338610 r339105
 CC||h...@chromium.org

--- Comment #2 from Hans Wennborg  ---
Merged in r339105.

-- 
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 5614 in oss-fuzz: llvm/clang-fuzzer: ASSERT: NextLocalOffset + TokLength + 1 > NextLocalOffset && NextLocalOffset + TokLength

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

Updates:
Labels: ClusterFuzz-Verified
Status: Verified

Comment #6 on issue 5614 by ClusterFuzz-External: llvm/clang-fuzzer:  
ASSERT: NextLocalOffset + TokLength + 1 > NextLocalOffset &&  
NextLocalOffset + TokLength

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

ClusterFuzz testcase 4695347394772992 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 38406] [meta] 7.0.0 Release Blockers

2018-08-07 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=38406
Bug 38406 depends on bug 38436, which changed state.

Bug 38436 Summary: [AVX] masked store for <3 x i32> triggers an assertion
https://bugs.llvm.org/show_bug.cgi?id=38436

   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 38436] [AVX] masked store for <3 x i32> triggers an assertion

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

Hans Wennborg  changed:

   What|Removed |Added

 CC||h...@chromium.org
 Status|NEW |RESOLVED
 Resolution|--- |FIXED
 Fixed By Commit(s)|r338915 |r338915 r339106

--- Comment #4 from Hans Wennborg  ---
(In reply to Craig Topper from comment #3)
> Fixed in r338915. Though the codegen for avx512 could be better.

Merged in r339106.

-- 
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 38453] lldb: new (unit)test failures in 7.0

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

Hans Wennborg  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Fixed By Commit(s)||r338949 r339107
 CC||h...@chromium.org
 Status|NEW |RESOLVED

--- Comment #3 from Hans Wennborg  ---
(In reply to Leonard Mosescu from comment #2)
> The VMRange failure should be fixed by rL338949
> (https://reviews.llvm.org/D50290)

Merged to 7.0 in r339107.

-- 
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 38406] [meta] 7.0.0 Release Blockers

2018-08-07 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=38406
Bug 38406 depends on bug 38453, which changed state.

Bug 38453 Summary: lldb: new (unit)test failures in 7.0
https://bugs.llvm.org/show_bug.cgi?id=38453

   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 38467] New: bugpoint fails to create valid tmp files on windows

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

Bug ID: 38467
   Summary: bugpoint fails to create valid tmp files on windows
   Product: tools
   Version: trunk
  Hardware: PC
OS: Windows NT
Status: NEW
  Severity: enhancement
  Priority: P
 Component: bugpoint
  Assignee: unassignedb...@nondot.org
  Reporter: llvm-...@redking.me.uk
CC: llvm-bugs@lists.llvm.org

Seemingly since the move over to sys::fs::TempFile, windows builds of bugpoint
are unable to load the tmp files - the tmp files are created but not closed so
when the driver passes the tmp filename on it finds a locked, empty file and
aborts.

bugpoint -safe-llc 

*** All input ok
Initializing execution environment: Found llc: E:\llvm\ninja\bin\llc.exe
Running the code generator to test for a crash: *** Debugging code
generator crash!

Error running tool:
  E:\llvm\ninja\bin\llc.exe -o bugpoint-test-program-c4f82bf.bc-8eacd60.llc.s
bugpoint-test-program-c4f82bf.bc
E:\llvm\ninja\bin\llc.exe: error: E:\llvm\ninja\bin\llc.exe:
bugpoint-test-program-c4f82bf.bc: error: Could not open input file: permission
denied

Checking to see if we can delete global inits: 

*** Able to remove all global initializers!
Checking for crash with changing conditionals to always jump to true: entry:
E:\llvm\ninja\bin\opt.exe: bugpoint-input-29bf62d.bc: error: Could not open
input file: permission denied
verify failed!

-- 
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 8190 in oss-fuzz: llvm/llvm-dwarfdump-fuzzer: Heap-buffer-overflow in llvm::object::Decompressor::consumeCompressedGnuHeader

2018-08-07 Thread jo… via monorail via llvm-bugs


Comment #5 on issue 8190 by jo...@devlieghere.com:  
llvm/llvm-dwarfdump-fuzzer: Heap-buffer-overflow in  
llvm::object::Decompressor::consumeCompressedGnuHeader

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

This is also WASM, we get a bogus value for the section data length from  
WasmObjectFile::getSectionContents.


--
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 9729] Error truncation removes helpful information

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

David Chisnall  changed:

   What|Removed |Added

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

--- Comment #1 from David Chisnall  ---
This was fixed some time ago.

-- 
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 38468] New: Exceptions are not caught

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

Bug ID: 38468
   Summary: Exceptions are not caught
   Product: libc++
   Version: 6.0
  Hardware: Other
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: All Bugs
  Assignee: unassignedclangb...@nondot.org
  Reporter: teomo...@gmail.com
CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com

Env: armv7l GNU/Linux

Steps to reproduce:
1. Create the simplest
#include 

int main(int argc, char* argv[])
{
try
{
throw 1;
}
catch(...)
{
std::cout << "Exception is caught\n";
}
}

2. Compile like this:
clang++ -stdlib=libc++

3.Run application:

Actual result:
terminating with uncaught exception of type int
Aborted


Expected result:
Exception is caught


The more details are available here:
https://stackoverflow.com/questions/51673343/clang-with-libc-exceptions

-- 
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 38469] New: Incorrect mersenne_twister_engine equality comparison on initial seed states

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

Bug ID: 38469
   Summary: Incorrect mersenne_twister_engine equality comparison
on initial seed states
   Product: libc++
   Version: 7.0
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P
 Component: All Bugs
  Assignee: unassignedclangb...@nondot.org
  Reporter: hst...@ca.ibm.com
CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com

Created attachment 20654
  --> https://bugs.llvm.org/attachment.cgi?id=20654&action=edit
Program as described in the Description

[rand.req.eng] specifies the comparison between two engines as returning true
if the infinite sequences of values that would be generated by repeated calls
to their respective operator()s are equivalent.

The attached program seeds two mersenne_twister_engines with specific states.
It asserts that the values returned by the engines match for some number of
calls, and that the engines are considered equivalent after that set of calls.

It then asserts that the engines were equivalent before those calls.
The assertion fails; however, either an earlier assertion should have failed,
or the engines before those calls do indeed produce equivalent infinite
sequences of values.

Online compiler: https://wandbox.org/permlink/a3frEvZRLgezujN1


=== COMPILER INVOCATION:
clang++ -stdlib=libc++ -std=c++17 -pedantic-errors -Wall -Wextra -Werror -xc++
mteEqSeededStates.cc -o ./a.out


=== RUN SCRIPT:
./a.out


=== EXPECTED RUN OUTPUT:
(Exits with rc=0).


=== ACTUAL RUN OUTPUT:
a.out: mteEqSeededStates.cc:74: int main(): Assertion
`enginesCompareEqualOnInit' failed.


=== COMPILER VERSION INFO (clang++ -v):
clang version 8.0.0 (https://github.com/llvm-mirror/clang.git
074152df061007c8500515698b57a5af7103)
(https://github.com/llvm-mirror/llvm.git
40868d437198d20a353ce4f4fb114b4d33efe5aa)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/wandbox/clang-head/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.0.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Candidate multilib: .;@m64
Selected multilib: .;@m64

-- 
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 38470] New: Incorrect mersenne_twister_engine equality comparison with tempering

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

Bug ID: 38470
   Summary: Incorrect mersenne_twister_engine equality comparison
with tempering
   Product: libc++
   Version: 7.0
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P
 Component: All Bugs
  Assignee: unassignedclangb...@nondot.org
  Reporter: hst...@ca.ibm.com
CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com

[rand.req.eng] specifies the comparison between two engines as returning true
if the infinite sequences of values that would be generated by repeated calls
to their respective operator()s are equivalent.

Tempering parameters may cause the values resulting from two engines to be the
same even if there is no number for which applying that number of calls to the
two engines will cause the two engines to have the same internal state.

Trivially, tempering_l may be selected as 0u to discard all bits of the
internal state from the output.

The following program seeds two mersenne_twister_engines with specific states.
It asserts that the values returned by the engines match for some number of
calls; and that the engines, after that set of calls, each compare equal to an
engine that is in the corresponding initial state.

It then asserts that the engines, now again in their initial states, compare
equal. The assertion fails; however, either an earlier assertion should have
failed, or the engines will indeed produce equivalent infinite sequences of
values.

Online compiler: https://wandbox.org/permlink/iurpDM59GPZiwugq


=== SOURCE ():
#include 
#ifdef NDEBUG
#undef NDEBUG
#endif
#include 
#ifndef _LIBCPP_VERSION
#error
#endif

int main(void) {
  typedef unsigned int EngResType;

  constexpr size_t word_size = 3u;
  constexpr size_t state_size = 1u;
  constexpr size_t shift_size = 1u;

  constexpr size_t tempering_t = 0u;
  constexpr EngResType tempering_c = 0b001;
  constexpr size_t tempering_l = word_size;

  using namespace std;
  using EngineType =
  std::mersenne_twister_engine;

  const EngineType mteA0(0b100), mteB0(0b101);
  EngineType mteA(0b100), mteB(0b101);

  for (int i = 0; i < 4; ++i) {
assert(mteA() == mteB());
  }
  assert(mteA == mteA0 && mteB == mteB0);
  assert(mteA == mteB);
}


=== COMPILER INVOCATION:
clang++ -stdlib=libc++ -std=c++17 -pedantic-errors -Wall -Wextra -Werror -xc++
- -o ./a.out


=== RUN SCRIPT:
./a.out


=== EXPECTED RUN RESULT:
(Exits with rc=0).


=== ACTUAL RUN RESULT:
a.out: :40: int main(): Assertion `mteA == mteB' failed.


=== COMPILER VERSION INFO (clang++ -v):
clang version 8.0.0 (https://github.com/llvm-mirror/clang.git
074152df061007c8500515698b57a5af7103)
(https://github.com/llvm-mirror/llvm.git
40868d437198d20a353ce4f4fb114b4d33efe5aa)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/wandbox/clang-head/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.0.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Candidate multilib: .;@m64
Selected multilib: .;@m64

-- 
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 9752 in oss-fuzz: llvm/clang-fuzzer: Stack-overflow in AnalyzeImplicitConversions

2018-08-07 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-08-07

Type: Bug

New issue 9752 by ClusterFuzz-External: llvm/clang-fuzzer: Stack-overflow  
in AnalyzeImplicitConversions

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

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

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: 0x7ffeda79bbb8
Crash State:
  AnalyzeImplicitConversions

Sanitizer: address (ASAN)

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


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


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] Issue 8190 in oss-fuzz: llvm/llvm-dwarfdump-fuzzer: Heap-buffer-overflow in llvm::object::Decompressor::consumeCompressedGnuHeader

2018-08-07 Thread jo… via monorail via llvm-bugs


Comment #6 on issue 8190 by jo...@devlieghere.com:  
llvm/llvm-dwarfdump-fuzzer: Heap-buffer-overflow in  
llvm::object::Decompressor::consumeCompressedGnuHeader

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

https://reviews.llvm.org/D50387

--
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 38472] New: case value is not a constant expression with c++11 and beyond

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

Bug ID: 38472
   Summary: case value is not a constant expression with c++11 and
beyond
   Product: clang
   Version: trunk
  Hardware: PC
OS: Windows NT
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Driver
  Assignee: unassignedclangb...@nondot.org
  Reporter: steve...@gmail.com
CC: llvm-bugs@lists.llvm.org

This code extracted from real code causes clang diagnostics to be issued from
clang-tidy, and from clang++.exe in c++11 mode, but not from clang-cl.exe and
not from clang++.exe in c++98 mode:


template
class MyEnum
{
public:
MyEnum()
{
}
MyEnum(ENUM)
{
}
operator ENUM() const { return static_cast(0); }
};

enum Enum
{
SomeValue
};

#ifdef BROKEN
template
#endif
struct Templ
{
Templ()
{
switch (m_enumMember)
#if 0
switch (static_cast(m_enumMember))
#endif
{
case SomeValue:
break;
}
}
MyEnum m_enumMember;
};

int main()
{
#ifdef BROKEN
Templ t1;
#else
Templ t2;
#endif
}

The error only occurs if Templ is a template and instantiated.


C:\dev\src\llvm\build\releaseprefix\bin\clang++.exe -Weverything -std=c++11 -c
-DBROKEN diagerror.cpp
diagerror.cpp
diagerror.cpp:29:14: error: case value is not a constant expression
case SomeValue:
 ^
diagerror.cpp:29:14: note: non-constexpr constructor 'MyEnum' cannot be used in
a constant expression
diagerror.cpp:9:5: note: declared here
MyEnum(ENUM)
^
diagerror.cpp:27:17: warning: enumeration value 'SomeValue' not handled in
switch [-Wswitch]
switch (m_enumMember)
^
1 warning and 1 error generated.


I don't understand why the error only occurs when used in a template. 

It would be good if there were some way to trigger the error with clang-cl.

-- 
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 24923] Broken module (piece is larger than or outside of variable) with -g and -flto

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

Paul Robinson  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|REOPENED|RESOLVED

--- Comment #24 from Paul Robinson  ---
This was fixed a while ago and our codebase that triggered it is happy now.

-- 
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 36523] /SUBSYSTEM not taken into account for automatic /ENTRY detection

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

Nico Weber  changed:

   What|Removed |Added

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

--- Comment #8 from Nico Weber  ---
r339165

-- 
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 38473] New: 7.0.0 rc1: 16 libc++ tests failing on macOS/x86_64 (Exit Code: -11)

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

Bug ID: 38473
   Summary: 7.0.0 rc1: 16 libc++ tests failing on macOS/x86_64
(Exit Code: -11)
   Product: libc++
   Version: 7.0
  Hardware: PC
OS: All
Status: NEW
  Severity: normal
  Priority: P
 Component: All Bugs
  Assignee: unassignedclangb...@nondot.org
  Reporter: v...@apple.com
CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com

These tests all fail in what looks to be the same way:

libc++ ::
std/language.support/support.exception/except.nested/assign.pass.cpp
libc++ ::
std/language.support/support.exception/except.nested/ctor_copy.pass.cpp
libc++ ::
std/language.support/support.exception/except.nested/ctor_default.pass.cpp
libc++ ::
std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp
libc++ ::
std/language.support/support.exception/except.nested/rethrow_nested.pass.cpp
libc++ ::
std/language.support/support.exception/propagation/make_exception_ptr.pass.cpp
libc++ ::
std/language.support/support.exception/propagation/rethrow_exception.pass.cpp
libc++ :: std/thread/futures/futures.async/async.pass.cpp
libc++ :: std/thread/futures/futures.promise/dtor.pass.cpp
libc++ :: std/thread/futures/futures.promise/set_exception.pass.cpp
libc++ ::
std/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp
libc++ :: std/thread/futures/futures.shared_future/get.pass.cpp
libc++ ::
std/thread/futures/futures.task/futures.task.members/dtor.pass.cpp
libc++ ::
std/thread/futures/futures.task/futures.task.members/make_ready_at_thread_exit.pass.cpp
libc++ ::
std/thread/futures/futures.task/futures.task.members/operator.pass.cpp
libc++ :: std/thread/futures/futures.unique_future/get.pass.cpp

To reproduce the failure, I did:

$ export MACOSX_DEPLOYMENT_TARGET="10.9"
$ ./llvm/utils/release/test-release.sh -release 7.0.0 -rc 1 -triple
x86_64-apple-darwin -no-compare-files -j20

Here's a sample failure:

FAIL: libc++ ::
std/language.support/support.exception/except.nested/assign.pass.cpp (49834 of
54980)
 TEST 'libc++ ::
std/language.support/support.exception/except.nested/assign.pass.cpp' FAILED

Compiled With:
['/Users/vsk/src/llvm.org-master/rc1/Phase2/Release/llvmCore-7.0.0-rc1.install/usr/local/bin/clang++',
'-o',
'/Users/vsk/src/llvm.org-master/rc1/Phase3/Release/llvmCore-7.0.0-rc1.obj/projects/libcxx/test/std/language.support/support.exception/except.nested/Output/assign.pass.cpp.o',
'-x', 'c++',
'/Users/vsk/src/llvm.org-master/rc1/llvm.src/projects/libcxx/test/std/language.support/support.exception/except.nested/assign.pass.cpp',
'-c', '-v', '-arch', 'x86_64', '-mmacosx-version-min=10.13',
'-D_LIBCPP_DISABLE_AVAILABILITY', '-ftemplate-depth=270',
'-Werror=thread-safety', '-std=c++2a', '-include',
'/Users/vsk/src/llvm.org-master/rc1/llvm.src/projects/libcxx/test/support/nasty_macros.hpp',
'-nostdinc++',
'-I/Users/vsk/src/llvm.org-master/rc1/llvm.src/projects/libcxx/include',
'-I/Users/vsk/src/llvm.org-master/rc1/Phase3/Release/llvmCore-7.0.0-rc1.obj/projects/libcxx/include/c++build',
'-isysroot',
'/Volumes/Xcode10A230a_m18A350_i16A343_t16J338_w16R338a_b16P349_XcodeInternals_32bitSupport_FastSim_Boost_ASan_36GB/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk',
'-I/Users/vsk/src/llvm.org-master/rc1/llvm.src/projects/libcxx/test/support',
'-DLIBCXX_FILESYSTEM_STATIC_TEST_ROOT="/Users/vsk/src/llvm.org-master/rc1/llvm.src/projects/libcxx/test/std/input.output/filesystems/Inputs/static_test_env"',
'-DLIBCXX_FILESYSTEM_DYNAMIC_TEST_ROOT="/Users/vsk/src/llvm.org-master/rc1/Phase3/Release/llvmCore-7.0.0-rc1.obj/projects/libcxx/test/filesystem/Output/dynamic_env"',
'-DLIBCXX_FILESYSTEM_DYNAMIC_TEST_HELPER="/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
/Users/vsk/src/llvm.org-master/rc1/llvm.src/projects/libcxx/test/support/filesystem_dynamic_test_helper.py"',
'-D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER', '-Wall', '-Wextra', '-Werror',
'-Wuser-defined-warnings', '-Wshadow', '-Wno-unused-command-line-argument',
'-Wno-attributes', '-Wno-pessimizing-move', '-Wno-c++11-extensions',
'-Wno-user-defined-literals', '-Wno-noexcept-type',
'-Wno-aligned-allocation-unavailable', '-Wsign-compare', '-Wunused-variable',
'-Wunused-parameter', '-Wunreachable-code', '-Wno-conversion',
'-Wno-unused-local-typedef', '-c', '&&',
'/Users/vsk/src/llvm.org-master/rc1/Phase2/Release/llvmCore-7.0.0-rc1.install/usr/local/bin/clang++',
'-o',
'/Users/vsk/src/llvm.org-master/rc1/Phase3/Release/llvmCore-7.0.0-rc1.obj/projects/libcxx/test/std/language.support/support.exception/except.nested/Output/assign.pass.cpp.exe',
'/Users/vsk/src/llvm.org-master/rc1/Phase3/Release/llvmCore-7.0.0-rc1.obj/projects/libcxx/test/std/language.support/suppor

[llvm-bugs] [Bug 37960] [debugify] ipsccp fail

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

Grammenos Anastasis  changed:

   What|Removed |Added

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

--- Comment #3 from Grammenos Anastasis  ---
https://reviews.llvm.org/rL339173

-- 
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 37953] [meta] [debugify] fix -check-debugify failures

2018-08-07 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=37953
Bug 37953 depends on bug 37960, which changed state.

Bug 37960 Summary: [debugify] ipsccp fail
https://bugs.llvm.org/show_bug.cgi?id=37960

   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 33944] utils/lit/tests/shtest-timeout.py fails on Windows

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

Stella Stamenova  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
 Fixed By Commit(s)||6389250
 CC||sti...@microsoft.com

--- Comment #2 from Stella Stamenova  ---
This should be fixed by commit 6389250

-- 
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 33944] utils/lit/tests/shtest-timeout.py fails on Windows

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

Stella Stamenova  changed:

   What|Removed |Added

 Resolution|FIXED   |---
 Status|RESOLVED|REOPENED

--- Comment #3 from Stella Stamenova  ---
This passes when using Python 3, but the bots use Python 2 and it fails there.
It needs further investigation.

-- 
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 38474] New: Merge r339190 into the 7.0 branch : AMDGPU: Remove broken i16 ternary patterns

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

Bug ID: 38474
   Summary: Merge r339190 into the 7.0 branch : AMDGPU: Remove
broken i16 ternary patterns
   Product: new-bugs
   Version: 7.0
  Hardware: All
OS: All
Status: NEW
  Severity: enhancement
  Priority: P
 Component: new bugs
  Assignee: unassignedb...@nondot.org
  Reporter: jan.ves...@rutgers.edu
CC: llvm-bugs@lists.llvm.org
Blocks: 38406

Is it OK to merge the following revision(s) to the 7.0 branch?


Referenced Bugs:

https://bugs.llvm.org/show_bug.cgi?id=38406
[Bug 38406] [meta] 7.0.0 Release Blockers
-- 
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 38441] R_ARM_V4BX relocation is not implemented

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

yi...@codeaurora.org changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|NEW |RESOLVED

--- Comment #1 from yi...@codeaurora.org ---


*** This bug has been marked as a duplicate of bug 38303 ***

-- 
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 38475] New: multiply intrinsic that returns high bits

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

Bug ID: 38475
   Summary: multiply intrinsic that returns high bits
   Product: new-bugs
   Version: unspecified
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: new bugs
  Assignee: unassignedb...@nondot.org
  Reporter: sland...@gmail.com
CC: llvm-bugs@lists.llvm.org

mips and sh4[1] have multiply instructions that return a type twice as wide as
the operands and do not overflow. It would be nice if llvm knew how to use
these instructions.

[1] http://www.shared-ptr.com/sh_insns.html

-- 
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 38286] ICE "couldn't find injected class name"

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

Richard Smith  changed:

   What|Removed |Added

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

--- Comment #2 from Richard Smith  ---
Crash fixed in r339210. The accepts-invalid in comment#1 is a separate bug
(PR31765).

-- 
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 38476] New: LLVM-7.0.0-rc1 Windows binaries are missing app-local Universal CRT

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

Bug ID: 38476
   Summary: LLVM-7.0.0-rc1 Windows binaries are missing app-local
Universal CRT
   Product: Packaging
   Version: unspecified
  Hardware: PC
OS: Windows NT
Status: NEW
  Severity: normal
  Priority: P
 Component: Windows Installer
  Assignee: unassignedb...@nondot.org
  Reporter: sfi...@hotmail.com
CC: llvm-bugs@lists.llvm.org

Unlike the previous 6.0.0 release, LLVM-7.0.0-rc1-win32.exe and
LLVM-7.0.0-rc1-win64.exe are missing bin\api-ms-win-*.dll and bin\ucrtbase.dll
. I believe that this will prevent them from working on pre-Win10 OSes where
the Universal CRT hasn't been installed. (According to my understanding, Win10
and Server 2016 are unaffected as they inherently contain the Universal CRT;
clang-cl.exe successfully runs on my Server 2016 machine where ucrtbase.dll is
present, but where I have intentionally never installed msvcp140.dll.)

If LLVM has chosen to begin requiring the Universal CRT as a prerequisite (i.e.
requiring the corresponding Windows Update or the VCRedist to be installed on
pre-Win10 OSes), then this is by design, but I wanted to ask.

-- 
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 38477] New: A/F: (EltVT.getSizeInBits() >= 64 || (uint64_t)((int64_t)Val >> EltVT.getSizeInBits()) + 1 < 2) && "getConstant with a uint64_t value that doesn't fit in the type!"' faile

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

Bug ID: 38477
   Summary: A/F: (EltVT.getSizeInBits() >= 64 ||
(uint64_t)((int64_t)Val >> EltVT.getSizeInBits()) + 1
< 2) && "getConstant with a uint64_t value that
doesn't fit in the type!"' failed after r339121
   Product: new-bugs
   Version: trunk
  Hardware: PC
OS: Windows NT
Status: NEW
  Severity: normal
  Priority: P
 Component: new bugs
  Assignee: unassignedb...@nondot.org
  Reporter: douglas_y...@playstation.sony.com
CC: llvm-bugs@lists.llvm.org

Commit r339121 is causing an assertion failure in several of our internal tests
when compiling with optimizations enabled. Here is a repro:

/* test2.cpp */
typedef unsigned char uchar;
typedef uchar __attribute__((ext_vector_type(8))) uchar8;

uchar8 foo() {
  volatile uchar8 P  = {112, 152, 64, 187, 255, 57, 56, 139};
  uchar8 R  = {1, 119, 73, 145, 253, 118, 32, 31};
  return P % R;
}

And compiled on linux using "clang -c -O2 test2.cpp":

clang-8:
/home/dyung/src/upstream/llvm_clean/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1187:
llvm::SDValue llvm::SelectionDAG::getConstant(uint64_t, const llvm::SDLoc &,
llvm::EVT, bool,
bool): Assertion `(EltVT.getSizeInBits() >= 64 || (uint64_t)((int64_t)Val >>
EltVT.getSizeInBits())
+ 1 < 2) && "getConstant with a uint64_t value that doesn't fit in the type!"'
failed.
Stack dump:
0.Program arguments: /home/dyung/src/upstream/339121-linux/bin/clang-8 -cc1
-triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name test2.cpp
-mrelocation-model
static -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables
-fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb
-momit-leaf-frame-pointer -coverage-notes-file
/home/dyung/sandbox/random_intrinsics/test2.gcno
-resource-dir /home/dyung/src/upstream/339121-linux/lib/clang/8.0.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/5.5.0/../../../../include/c++/5.5.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/5.5.0/../../../../include/x86_64-linux-gnu/c++/5.5.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/5.5.0/../../../../include/x86_64-linux-gnu/c++/5.5.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/5.5.0/../../../../include/c++/5.5.0/backward
-internal-isystem /usr/local/include -internal-isystem
/home/dyung/src/upstream/339121-linux/lib/clang/8.0.0/include
-internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem
/usr/include -O2 -fdeprecated-macro -fdebug-compilation-dir
/home/dyung/sandbox/random_intrinsics
-ferror-limit 19 -fmessage-length 0 -fobjc-runtime=gcc -fcxx-exceptions
-fexceptions
-fdiagnostics-show-option -vectorize-loops -vectorize-slp -o test2.o -x c++
test2.cpp -faddrsig 
1. parser at end of file
2.Code generation
3.Running pass 'Function Pass Manager' on module 'test2.cpp'.
4.Running pass 'X86 DAG->DAG Instruction Selection' on function '@_Z3foov'
#0 0x020b4c94 PrintStackTraceSignalHandler(void*)
(/home/dyung/src/upstream/339121-linux/bin/clang-8+0x20b4c94)
#1 0x020b2b3e llvm::sys::RunSignalHandlers()
(/home/dyung/src/upstream/339121-linux/bin/clang-8+0x20b2b3e)
#2 0x020b4e52 SignalHandler(int)
(/home/dyung/src/upstream/339121-linux/bin/clang-8+0x20b4e52)
#3 0x7fe2b2dc2330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#4 0x7fe2b1bbac37 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x36c37)
#5 0x7fe2b1bbe028 abort (/lib/x86_64-linux-gnu/libc.so.6+0x3a028)
#6 0x7fe2b1bb3bf6 (/lib/x86_64-linux-gnu/libc.so.6+0x2fbf6)
#7 0x7fe2b1bb3ca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#8 0x029bed2e llvm::SelectionDAG::getConstant(unsigned long,
llvm::SDLoc const&, llvm::EVT,
bool, bool) (/home/dyung/src/upstream/339121-linux/bin/clang-8+0x29bed2e)
#9 0x02a33de1 llvm::TargetLowering::BuildUDIV(llvm::SDNode*,
llvm::SelectionDAG&, bool,
llvm::SmallVectorImpl&) const
(/home/dyung/src/upstream/339121-linux/bin/clang-8+0x2a33de1)
#10 0x028faca0 (anonymous
namespace)::DAGCombiner::visitUDIVLike(llvm::SDValue,
llvm::SDValue, llvm::SDNode*)
(/home/dyung/src/upstream/339121-linux/bin/clang-8+0x28faca0)
#11 0x028ba75f (anonymous namespace)::DAGCombiner::visit(llvm::SDNode*)
(/home/dyung/src/upstream/339121-linux/bin/clang-8+0x28ba75f)
#12 0x028a48dc (anonymous
namespace)::DAGCombiner::combine(llvm::SDNode*)
(/home/dyung/src/upstream/339121-linux/bin/clang-8+0x28a48dc)
#13 0x028a36f4 llvm::SelectionDAG::Combine(llvm::CombineLevel,
llvm::AAResults*,
llvm::CodeGenOpt::Level)
(/home/dyung/src/upstream/339121-linux/bin/clang-8+0x28a36f4)
#14 0x029ff4ad llvm::SelectionDAGISel::CodeGenAndEmitDAG()
(/home/dyung/src/upstream/339121-linux/bin/clang-8+0x29ff4ad)
#15 0x029fd386
llvm::SelectionDAGIS

[llvm-bugs] [Bug 38478] New: Clang 7.0.0 RC1 -fno-ms-compatibility rejects Windows.h

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

Bug ID: 38478
   Summary: Clang 7.0.0 RC1 -fno-ms-compatibility rejects
Windows.h
   Product: clang
   Version: trunk
  Hardware: PC
OS: Windows NT
Status: NEW
  Severity: normal
  Priority: P
 Component: -New Bugs
  Assignee: unassignedclangb...@nondot.org
  Reporter: sfi...@hotmail.com
CC: llvm-bugs@lists.llvm.org

I use -fno-ms-compatibility to verify that MSVC's STL uses conformant code
whenever possible. Between Clang 6.0.0 and 7.0.0 RC1, this started rejecting
Windows.h due to nonconformant enumerators:

C:\Temp>type kitty.cpp
#include 

C:\Temp>clang-cl -m32 -v
clang version 7.0.0 (tags/RELEASE_700/rc1)
Target: i386-pc-windows-msvc
Thread model: posix
InstalledDir: S:\msvc\src\vctools\NonShip\ClangLLVM\bin

C:\Temp>clang-cl -m32 /EHsc /nologo /W4 /c -fno-ms-compatibility kitty.cpp
In file included from kitty.cpp:1:
In file included from
S:\msvc\src\ExternalApis\Windows\10\sdk\inc\Windows.h:173:
S:\msvc\src\ExternalApis\Windows\10\sdk\inc\wingdi.h(2819,5):  error:
enumerator value is not representable in the
  underlying type 'int'
DISPLAYCONFIG_OUTPUT_TECHNOLOGY_INTERNAL= 0x8000,
^
[...]

I've reported this to the WinSDK team, but I still need to unblock my testing
in the meantime. Can some way be added to request the strictness of
-fno-ms-compatibility, but without rejecting Windows.h like this?

Possibilities:

* A fine-grained option, so I could compile with -fno-ms-compatibility
-fms-compatibility-enum-value to request strictness for everything except these
enum values. 

* I observe that -Wmicrosoft contains the fine-grained warning
-Wmicrosoft-enum-value for this case. Instead of introducing a new fine-grained
option, if -fno-ms-compatibility -Wno-microsoft-enum-value avoided this error,
that would be equally good for me. Perhaps better, because then I could wrap
Windows.h in

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wmicrosoft-enum-value"
#pragma clang diagnostic pop

and retain the enum strictness for the rest of our code.

* Go back to doing whatever Clang 6 did, which was presumably to consider this
enum behavior part of ms-extensions instead of ms-compatibility (but allowing
-Wmicrosoft to warn about it).

-- 
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 38445] llvm optimizer abort in O2

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

Santosh Zanjurne  changed:

   What|Removed |Added

 Status|ASSIGNED|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 38479] New: Missed pattern 0 modulo/div/mul N in phi

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

Bug ID: 38479
   Summary: Missed pattern 0 modulo/div/mul N in phi
   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

unsigned int hash_function(const char *str, unsigned hash_tab_size) {
unsigned int h = 0;
const unsigned char *p;
for (p = (const unsigned char *) str; *p != '\0'; p++)
h = 65599 * h + *p;
return h % hash_tab_size;
// return h / hash_tab_size;
// return h * hash_tab_size;
// similar code generation
}

Lets say p[0] is \0   -> .LBB0_1

Latest trunk, O3:
hash_function(char const*, unsigned int):  #
@hash_function(char const*, unsigned int)
mov cl, byte ptr [rdi]
testcl, cl
je  .LBB0_1
add rdi, 1
xor eax, eax
.LBB0_3:# =>This Inner Loop Header: Depth=1
movzx   ecx, cl
imuleax, eax, 65599
add eax, ecx
movzx   ecx, byte ptr [rdi]
add rdi, 1
testcl, cl
jne .LBB0_3
xor edx, edx
div esi
mov eax, edx
ret
.LBB0_1: 
xor eax, eax
xor edx, edx 
div esi  // useless
mov 

I believe these are important lines in the IR:
%16 = phi i32 [ 0, %2 ], [ %11, %5 ]
%17 = urem i32 %16, %1
ret i32 %17

In this case we should expand/simplify phi and remove "0 urem %1"

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